Re: [GSoC][PATCH v2 7/7] fsck: add ref content check for files backend
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 14, 2024, 18:56 UTC
- Message-ID
- <xmqq1q4zfj4r.fsf@gitster.g>
- In-Reply-To
- <CAH-kW5f0u1uFH7Y83e4Vp8avM_7MPLkDG7v9NPV1nL=wZ--wmw@mail.gmail.com>
jialuo she <shejialuo@gmail.com> writes:
Show 6 quoted lines
> Instead, we should warn about the user when using > > $ git branch branch-3 master > > It will create a new pointee here, I suppose we should warn the user > here except HEAD ref.
The user created branch-3 as a symlink, fully expecting that the pointee will be updated.
By the way, a seemingly normal branch looking symref is very handy and that is what my "maint" branch looks like. Right now it is pointing at maint-2.45 (because 2.45.0 was the last feature release)
$ git symbolic-ref refs/heads/maint
refs/heads/maint-2.45and I would imagine many other users are using the trick to maintain multiple maintenance tracks. They would be upset if their next "Now 2.46.0 release is done, let's start the 2.46 maintenance track" mantra, which would look like so:
$ git symbolic-ref refs/heads/maint refs/heads/maint-2.46 $ git branch maint v2.46.0
starts to give an unnecessary warning.