From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH 0/3] I keep typing "git log --no-mailmap" X-<
Date: Mon, 16 Mar 2020 14:28:54 -0700 [thread overview]
Message-ID: <20200316212857.259093-1-gitster@pobox.com> (raw)
The ultimate objective of this miniseries is to allow me to say
"git log --no-mailmap" by adding an alias "--mailmap" to the
existing "--use-mailmap" option.
But I had to do a little cleaning up of the OPT_ALIAS() interface,
which is the topic of the first two patches. Without them, an
option that is an alias to another option is shown in "git cmd -h"
output like this illustration:
$ git clone -h
usage: git clone [<options>] [--] <repo> [<dir>]
...
--recursive[=<pathspec>]
initialize submodules in the clone
--recurse-submodules[=<pathspec>]
initialize submodules in the clone
-j, --jobs <n> number of submodules cloned in parallel
...
The "recursive" option is defined as an alias to "recurse-submodules",
but with exactly the same short text, the user may realize that they
are identical, or they may suspect they are largely similar with
subtle differences that the short help text cannot adequately convey.
With the first two patches, the output becomes like this:
$ git clone -h
usage: git clone [<options>] [--] <repo> [<dir>]
...
--recurse-submodules[=<pathspec>]
initialize submodules in the clone
--recursive[=<pathspec>]
alias of --recurse-submodules
-j, --jobs <n> number of submodules cloned in parallel
...
which would make it clear that the latter is a way to spell the same
thing as the other.
Junio C Hamano (3):
parse-options: teach "git cmd -h" to show alias as alias
clone: reorder --recursive/--recurse-submodules
log: give --[no-]use-mailmap a more sensible synonym --[no-]mailmap
Documentation/git-log.txt | 1 +
builtin/clone.c | 2 +-
builtin/log.c | 1 +
parse-options.c | 9 +++------
t/t0040-parse-options.sh | 2 +-
5 files changed, 7 insertions(+), 8 deletions(-)
--
2.26.0-rc1-11-g30e9940356
next reply other threads:[~2020-03-16 21:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 21:28 Junio C Hamano [this message]
2020-03-16 21:28 ` [PATCH 1/3] parse-options: teach "git cmd -h" to show alias as alias Junio C Hamano
2020-03-16 21:28 ` [PATCH 2/3] clone: reorder --recursive/--recurse-submodules Junio C Hamano
2020-03-16 21:28 ` [PATCH 3/3] log: give --[no-]use-mailmap a more sensible synonym --[no-]mailmap Junio C Hamano
2020-03-16 21:39 ` Eric Sunshine
2020-03-16 22:38 ` Junio C Hamano
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=20200316212857.259093-1-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).