Re: Unexpected effect of log.showSignature on tformat:%H.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> 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 thing is, I'm generally interested in signatures when using git
interactively (that's why I enabled log.showSignature globally). But
then I have a scripted usecase that has a tag name, and needs to query
the corresponding commit hash, and in that context, I don't care about
signatures at all. The docs for git show say that %H expands to the
commit hash, which is exactly what I want. I didn't know about the %G
formats, but after a quick look at the docs, I don't think they solves
that problem.

I can work around this problem by using "export
GIT_CONFIG_GLOBAL=/dev/null" in the script, which I guess might be
generally good practice when using git in scripts? But I still think it
would be useful if there were an easy and reliable way to get from tag
to commit hash, regardless of the user's config settings.

Regards,
/Niels Möller





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux