git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH 3/3] log: give --[no-]use-mailmap a more sensible synonym --[no-]mailmap
Date: Mon, 16 Mar 2020 17:39:50 -0400	[thread overview]
Message-ID: <CAPig+cRj5c-AEOySWkfM=PX-CUFO-R-cN8pgyTm0kD32xyhihA@mail.gmail.com> (raw)
In-Reply-To: <20200316212857.259093-4-gitster@pobox.com>

On Mon, Mar 16, 2020 at 5:29 PM Junio C Hamano <gitster@pobox.com> wrote:
> The option name "--use-mailmap" looks OK, but it becomes awkward
> when you have to negate it, i.e. "--no-use-mailmap".  I, perhaps
> with many other users, always try "--no-mailmap" and become unhappy
> to see it fail.
>
> Add an alias "--[no-]mailmap" to remedy this.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
> @@ -49,6 +49,7 @@ OPTIONS
> +--[no-]mailmap::
>  --[no-]use-mailmap::
>         Use mailmap file to map author and committer names and email
>         addresses to canonical real names and email addresses. See

Here, the documentation seems to promote --mailmap over --use-mailmap.

> diff --git a/builtin/log.c b/builtin/log.c
> @@ -173,6 +173,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
>                 OPT_BOOL(0, "use-mailmap", &mailmap, N_("Use mail map file")),
> +               OPT_ALIAS(0, "mailmap", "use-mailmap"),

So, along the lines of patch 2/3, I wonder if this should instead make
--mailmap the "real" option and --use-mailmap the alias; namely, use
OPT_ALIAS for --use-mailmap and place it after --mailmap. (Genuine but
very minor question; should not hold up acceptance of patch.)

  reply	other threads:[~2020-03-16 21:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPig+cRj5c-AEOySWkfM=PX-CUFO-R-cN8pgyTm0kD32xyhihA@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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).