Re: Unexpected effect of log.showSignature on tformat:%H.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 19, 2024, 09:37 UTC
- Message-ID
- <xmqqmshvd0nn.fsf@gitster.g>
- In-Reply-To
- <87cyirtweq.fsf@localhost>
Niels Möller <nisse@glasklarteknik.se> writes:
> I had expected the output of git show -s --format='tformat:%H' to be > always the same, and was surprised to find that scripts using this > construction started to fail after I set log.showSignature true.
It is a bit unexpected, but knowing how the command options evolved, it is not all that surprising X-<. If you are using --format, you are expected to use the %G placeholder and friends when you are interested in signatures. The --show-signature option is unaware of the other formatting options like --pretty={short,oneline,fuller, so it is understandable (not "expected") what you are seeing.