Re: [PATCH v2 0/4] rev-parse: exit 0 on --help
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 3, 2026, 20:38 UTC
- Message-ID
- <xmqqwlvbhkpz.fsf@gitster.g>
- In-Reply-To
- <20260702084519.GB481298@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> The other issue I raised in the earlier round is that a script like: > > cat >git-foo <<\EOF > #!/bin/sh > git log --my-options "$@" >output || exit 1 > do_something <output > EOF > > when invoked as "git foo --help" will now call do_something with > nonsense input, rather than exiting from the "error" returned by > git-log. This only affects hacky little scripts like this that are not > otherwise parsing their own options, but sometimes those are the most > common. ;)
Yeah, I agree that the above is a much more likely breakage scenario than I imagined.
> I'm not convinced there will be much fallout, but it is possible.
True.