Re: git symbolic-ref vs. reflog (vs. rebase)
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:07
Jeff King [off-list ref] 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.