git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Manuel Quiñones" <manuel.por.aca@gmail.com>, git@vger.kernel.org
Subject: Re: Usability issue: "Your branch is up to date"
Date: Wed, 5 Feb 2025 07:54:48 +0100	[thread overview]
Message-ID: <Z6MLOA3mJGbPFBae@pks.im> (raw)
In-Reply-To: <xmqqseottxld.fsf@gitster.g>

On Tue, Feb 04, 2025 at 09:43:10AM -0800, Junio C Hamano wrote:
> 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

  reply	other threads:[~2025-02-05  6:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 16:45 Usability issue: "Your branch is up to date" Manuel Quiñones
2025-02-03 16:56 ` Junio C Hamano
2025-02-04  0:10   ` Junio C Hamano
2025-02-04  0:28     ` Bram van Oosterhout
     [not found]       ` <CAPx1GveyP4+yn5NMgvO3JpbOwPRT5=tb9YBx7U1Ufvae7gFnHQ@mail.gmail.com>
     [not found]         ` <CAMoUM6LstYx3PJcx-Sz3Dfs-1BxF1uP373MO8+eknbO7j-S01Q@mail.gmail.com>
2025-02-04  0:51           ` Fwd: " Bram van Oosterhout
2025-02-04  2:08       ` D. Ben Knoble
2025-02-04 12:53         ` Manuel Quiñones
2025-02-05  3:55         ` Bram van Oosterhout
2025-02-04 12:38     ` Manuel Quiñones
2025-02-04 17:43       ` Junio C Hamano
2025-02-05  6:54         ` Patrick Steinhardt [this message]
2025-02-05 18:40           ` Junio C Hamano
2025-02-06  9:53             ` Patrick Steinhardt
2025-02-07  8:20               ` Karthik Nayak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z6MLOA3mJGbPFBae@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=manuel.por.aca@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).