poll: when you see this message in `git status`:

”Your branch is up to date with 'origin/main’.”

do you know that your branch may not actually be up to date with the `main` branch on the remote?

yes
63.6%
mostly yes
15.7%
no
7.5%
what?
13.3%
Poll ended at .
(i've been wondering if there's a world where it's possible to convince the folks who make git to change that message to add “... as of 5 minutes/3 days/6 years ago”, but I think it might be hard to implement)

@b0rk I'm not sure if it would be possible without adding something extra.

Git can always check the committer date of the last commit on remote-tracking branch, but it this would not change when you refresh and remote does not have any changes.

With remote-tracking branch stored as loose ref (a file), you can check the modification time... but not if it is turned into packed ref, or if in the future Git would start using reftables backend for storing branches and remote-tracking branches.

@b0rk or to be more exact: modification time of loose ref would not change (as other already wrote) if the ref didn't change, and if it did not change for long time, it could be repacked into packed-ref format (and loose even this bit of information).

The reflog could record every fetch, successful or not, but I am not sure if it would not have some complications in other parts of git.