Subject: [PATCH 0/3] I keep typing "git log --no-mailmap" X-<

From: Junio C Hamano <[email-masked]>
Date: Mon, 16 Mar 2020 14:28:54 -0700

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