git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/3] I keep typing "git log --no-mailmap" X-<
@ 2020-03-16 21:28 Junio C Hamano
  2020-03-16 21:28 ` [PATCH 1/3] parse-options: teach "git cmd -h" to show alias as alias Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Junio C Hamano @ 2020-03-16 21:28 UTC (permalink / raw)
  To: git

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-16 22:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 21:28 [PATCH 0/3] I keep typing "git log --no-mailmap" X-< Junio C Hamano
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

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).