3 ms·
Very good point. “Up to date with origin/master as of 4 hours ago” would be an improvement.
by ksenzee 3y ago
Very good point. “Up to date with origin/master as of 4 hours ago” would be an improvement.
- pests 3y agoThat is a lie though. Who knows if the remote has been updated? You wouldn't find out about that 4 hours until you did a fetch. You can't go to the hotel desk clerk and ask if you have any messages. Then for the next four hours keep telling people "the front desk has no messages for me" despite you not asking them in the last 4 hours. Things could change!
- ksenzee 3y agoNo, this is exactly like a receipt from the ATM. “Your bank balance is $300.00 as of 10/10/23 10:10.” That was weeks ago, so I know to ignore it. The wording can likely be improved. Maybe “You are up to date with origin/master as last fetched 4 hours ago”.
- pests 3y ago> That was weeks ago, so I know to ignore it. But you haven't talked to your bank, used an ATM, or been on the app in weeks! Your balance could be totally different - bills have came out, you got paid, interest, etc. You are making my point! You know to ignore it because its old, outdated information. Then why are you telling me this? How is it useful to me? Of course youre up to date with what you last fetched - that is _always_ the case. Why mention being up to date even? Just tell the user when they last synced with their remote(s).
- SAI_Peregrinus 3y agoYou're making their point! `git status`tells you the status as of whenever you last fetched, and omits that timestamp. You can't tell if it's outdated, because it doesn't tell you when the last update was!
- mjochim 3y ago> Of course youre up to date with what you last fetched - that is _always_ the case. But that is not what this message is about. It's confusingly worded, as many people agree, but what it says is that your local ref "main" points to the same commit as your local ref "origin/main." It says nothing about "main" on the other computer/server. And it is not the case (i.e. you are not up to date with origin/main), for example, when you have committed to main but haven't pushed. It is also not the case when you have fetched but not merged.
- ksenzee 3y ago> Of course youre up to date with what you last fetched - that is _always_ the case. This might be where the misunderstanding is. You are not always up to date with what you last fetched. Say you have develop checked out, and you run a git pull. As part of that process, git checks the status of all upstream branches, and updates your local reference copy of them (that’s what origin/develop, origin/production, origin/feature-branch-1 are: your local reference copies of upstream). Then you check out production, which you last touched two weeks ago. Git will let you know that your two-week-old local copy is behind origin/production, which is your local reference copy of what it just saw when it fetched from upstream.