git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Usability issue: "Your branch is up to date"

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 5, 2025, 18:40 UTC
Message-ID
<xmqqikponsk6.fsf@gitster.g>
In-Reply-To
<Z6MLOA3mJGbPFBae@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 10 quoted lines
> One thing to consider is that some remotes tend to have many thousands
> or even hundreds of thousands of references. Updating timestamps for all
> of them could be quite inefficient depending on where exactly that data
> is store. If it was in the form of no-op reflog entries, the "files"
> backend would have to touch as many files as the remote has references.
> Consequently, even if only a single remote ref changed, we'd potentially
> have to update metadata on hundreds of thousands of files.
>
> So I'm not sure whether such a schema would scale well enough in the
> general case for large repos.
I actually view that as quite an orthogonal issue.

Recording the fact that you checked the state of thousands of refs at the remote and found them unchanged is probably a very small part of a larger problem that checking the state of thousands of refs is already expensive. People have solved it at the protocol level to limit the ref advertisement to only the relevant refs (as opposed to the original protocol where the server end unconditionally advertises the state of all of its refs at the beginning of the conversation), so when you are only pulling a single branch from there, you do not even observe the state of other unrelated refs (like other branches or pull/*/ hierarchy), hence you would not create these no-op reflog entries.

If the user, on the other hand, is interested in keeping track of all these thousands of refs, "git fetch" would have to ask and receive advertisement for all these thousands of refs anyway, and at that point, recording the no-op update would be a very small part of the problem, I suspect. Besides, we have reftable that would make this kind of problem easier to solve, no? ;-)

Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 11 of 14 in “Usability issue: "Your branch is up to date"”
  1. Manuel QuiñonesFeb 3, 2025
  2. Junio C HamanoFeb 3, 2025
  3. Junio C HamanoFeb 4, 2025
  4. Bram van OosterhoutFeb 4, 2025
  5. D. Ben KnobleFeb 4, 2025
  6. Manuel QuiñonesFeb 4, 2025
  7. Bram van OosterhoutFeb 5, 2025
  8. Manuel QuiñonesFeb 4, 2025
  9. Junio C HamanoFeb 4, 2025
  10. Patrick SteinhardtFeb 5, 2025
  11. Junio C HamanoFeb 5, 2025
  12. Patrick SteinhardtFeb 6, 2025
  13. Karthik NayakFeb 7, 2025
  14. Fwd: Usability issue: "Your branch is up to date"Bram van Oosterhout, Feb 4, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.