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?
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?
@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.