From: Junio C Hamano <gitster@pobox.com>
To: "Daniel Sonbolian via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Daniel Sonbolian <dsal3389@gmail.com>,
Ralf Thielow <ralf.thielow@gmail.com>
Subject: Re: [PATCH] git.c: fix, stop passing options after --help
Date: Mon, 10 Oct 2022 11:58:27 -0700 [thread overview]
Message-ID: <xmqq35bv33qk.fsf@gitster.g> (raw)
In-Reply-To: <pull.1357.git.git.1665418677535.gitgitgadget@gmail.com> (Daniel Sonbolian via GitGitGadget's message of "Mon, 10 Oct 2022 16:17:57 +0000")
"Daniel Sonbolian via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Daniel Sonbolian <dsal3389@gmail.com>
>
> Since commit c6b6d9f7d8a when passing --help option
When referring to an old work, use
$(git show -s --pretty=reference $that_commit)
I suspect that 2c6b6d9f (help: make option --help open man pages
only for Git commands, 2016-08-26) is what you meant (the author
CC'ed).
> to a Git command, we try to open that command man page, we
> do it for both commands and concepts, it is done by
> converting the entered command to a help command
> for the given Git command, for example:
>
> "git commit --help -i" into "git help --exclude-guides commit -i"
>
> But the options after --help option are also
> passed to the new command (-i option from the example)
"new command" meaning the "git help" command?
> which can lead to unexpected output, because the
> help command will try to execute those extra options.
Meaning "git commit --help -i" becomes "git help ... commit -i", and
because the command line parser of "git help" accepts dashed options
after "commit", it works just like "git help ... -i commit" does?
It is a request to read the help information for "git commit" using
the "--info" backend, right? Similarly, "git commit --help -m"
would do the manpage and "git commit --help -w" would show the
manpage in the browser?
It sounds like a sensible behaviour to me (even though relying on
the behaviour of "git help" that takes dashed options after "commit"
makes me feel somewhat dirty). So ...
> This fixed by building the argv statically, meaning
... I am not sure what you are fixing. Puzzled...
prev parent reply other threads:[~2022-10-10 18:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 16:17 [PATCH] git.c: fix, stop passing options after --help Daniel Sonbolian via GitGitGadget
2022-10-10 18:58 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq35bv33qk.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=dsal3389@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=ralf.thielow@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.