Re: [RFC/PATCH] Add fetch.updateHead option
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Nov 18, 2020, 09:30 UTC
- Message-ID
- <87wnyjdnb3.fsf@evledraar.gmail.com>
- In-Reply-To
- <20201118091219.3341585-1-felipe.contreras@gmail.com>
On Wed, Nov 18 2020, Felipe Contreras wrote:
Show 16 quoted lines
> Users might change the behavior when running "git fetch" so that the > remote's HEAD symbolic ref is updated at certain point. > > For example after running "git remote add" the remote HEAD is not > set like it is with "git clone". > > Setting "fetch.updatehead = missing" would probably be a sensible > default that everyone would want, but for now the default behavior is to > never update HEAD, so there shouldn't be any functional changes. > > For the next major version of Git, we might want to change this default. > > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> > --- > > This is just a RFC, the tests are missing.
I haven't taken much time to re-think through the patch/implications of this, but I remember running into this and going through some pre-patch investigation at some point.
It's really annoying in some cases that "clone" isn't creating the same state as "remote". IIRC I was doing some heuristics to figure out the remote branch name etc.
Isn't this something we can just change without an option? There were a bunch of cases in clone/fetch that were different for no different reasons, IIRC I patched one or two of those in the past. But I haven't gone through the history of the feature and checked if it was intentional.