Re: [PATCH 2/2] ls-remote: use PARSE_OPT_NO_INTERNAL_HELP
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- Oct 17, 2017, 17:42 UTC
- Message-ID
- <CAN0heSpk+PPX7cAXT+jTZZ_LCAY=z6W4wxP38DqH89wST4PSWw@mail.gmail.com>
- In-Reply-To
- <f66f3fc2-8f51-03f5-c242-cb6d776af585@web.de>
On 17 October 2017 at 17:39, René Scharfe <l.s.r@web.de> wrote:
Show 15 quoted lines
> Since ba5f28bf79 (ls-remote: use parse-options api) git ls-remote -h > without any other options has shown the short help text of the command > instead of acting as the short equivalent of --heads. Fix this > regression by turning off internal handling of -h for repository setup, > and option parsing, as well as the corresponding test in t0012. > > Reported-by: Thomas Rikl <trikl@online.de> > Analyzed-by: Martin Ågren <martin.agren@gmail.com> > Signed-off-by: Rene Scharfe <l.s.r@web.de> > --- > builtin/ls-remote.c | 1 + > git.c | 2 +- > t/t0012-help.sh | 1 + > t/t5512-ls-remote.sh | 6 ++++++ > 4 files changed, 9 insertions(+), 1 deletion(-)
Documentation/gitcli.txt might need updating. It says that "[c]ommands which have the enhanced option parser activated all understand ... -h". Of course, it already was in an incorrect state, since it pretends like no-one uses PARSE_OPT_NO_INTERNAL_HELP. Probably better to leave that until it's clear in which direction "git ls-remote -h" should go.