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

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

From
Patrick Steinhardt <ps@pks.im>
Date
Feb 5, 2025, 06:54 UTC
Message-ID
<Z6MLOA3mJGbPFBae@pks.im>
In-Reply-To
<xmqqseottxld.fsf@gitster.g>
On Tue, Feb 04, 2025 at 09:43:10AM -0800, Junio C Hamano wrote:
Show 22 quoted lines
> And the last step is where the remote-tracking branches are updated,
> together with their reflog (if enabled).  Because that step does not
> even see the remote-tracking branches whose value do not need to
> change (filtered out earlier to help reduce the number of refs fed
> to the object transfer machinery), the "drop no-op early" part need
> to be designed differently (e.g. mark them as no-op, so that the 
> object tranfer machinery can notice them and ignore) and then the
> "update refs" step can see these no-op updates.
> 
> I do not think writing the "no-op" reflog entries should be done at
> a step separate from the step that writes the real ref updates, as I
> suspect that such a separate update scheme would have a funny
> interactions with "git fetch --atomic".
> 
> So, do I think it could be possible?  Sure.  Do I think it would be
> too hard as a rocket surgery?  No.  Will I jump up and down excited
> and start coding?  I am not interested all that much, but I can help
> reviewing patches if somebody else works on it.
> 
> There may be some other downsides (other than the cost of storage
> and making the reflog noisy) I haven't thought about, which need to
> be considered if somebody decides to work on this.

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.

Patrick
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 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.