From: Csaba Henk Date: Mon, 02 May 2011 08:38:28 GMT Subject: Re: git symbolic-ref vs. reflog (vs. rebase) Message-ID: In-Reply-To: <7vk4ecvf2c.fsf@alter.siamese.dyndns.org> On Sat, Apr 30, 2011 at 4:30 AM, Junio C Hamano wrote: > Jeff King writes: > >> I think every caller should be using "-m" these days.  I know we can't >> _require_ it for historical reasons. But shouldn't symbolic-ref always >> write a reflog entry? Even something like "we changed and I can't tell >> you why" to cover older scripts that call symbolic-ref? > > I think the particular instance Csaba saw in rebase may want to pass the > reason why it flipped the HEAD. > > Flipping HEAD temporarily to another ref to do something, only to flip it > back before giving the control back to the user, might be something a > script may want to have a choice of not logging, so I am mildly negative > on changing the command to unconditionally log empty entry without being > told. > > "update-ref" seems to write an empty entry even when not given an "-m" > option, and we can view it as robbing a similar choice from the scripts. > We might want to fix it.  I dunno. What if symbolic-ref and/or update-ref were changed so that the default invocation would add a reflog entry with a default (empty?) note, however, also provide an option with which suppressing the reflog can be requested? Csaba