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 hmm the ref files should have an mtime that can be used for that, shouldn’t be so hard
@mxey @b0rk The reflog also stores the last time each ref was changed.
@unlambda @mxey @b0rk that would be a good start, but mtimes and reflog entries will only surface the last time the remote was checked *and there was an update to pull down*; it still leaves out the important case of when the ref was last checked and there were no updates to retrieve.
@gnomon @unlambda @mxey @b0rk But that case can be covered by explicitly recording the time of the last fetch from each remote somewhere in `.git` - which is not obviously difficult.

@rst @unlambda @mxey @b0rk yes, agreed, it should be simple conceptually and implementation-wise to meet the need; I was just making the point that an implementation _is_ needed, since the required information is not already present in the existing data structures.

Hmm, I _think_ a proc-receive hook¹ could potentially offer a prototype implementation with no core changes but to be honest that documentation is a little obtuse. I'll have to read the code some more.

¹: https://github.com/git/git/blob/e09f1254c54329773904fe25d7c545a1fb4fa920/Documentation/githooks.txt#L350-L410

git/Documentation/githooks.txt at e09f1254c54329773904fe25d7c545a1fb4fa920 · git/git

Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documen...

GitHub