git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH/RFC] commit: add short option for --amend
Date: Thu, 16 Aug 2018 23:47:34 -0700	[thread overview]
Message-ID: <20180817064734.GB131749@aiede.svl.corp.google.com> (raw)
In-Reply-To: <20180816183117.13716-1-pclouds@gmail.com>

Nguyễn Thái Ngọc Duy wrote:

> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -1489,7 +1489,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
>  			    STATUS_FORMAT_LONG),
>  		OPT_BOOL('z', "null", &s.null_termination,
>  			 N_("terminate entries with NUL")),
> -		OPT_BOOL(0, "amend", &amend, N_("amend previous commit")),
> +		OPT_BOOL('j', "amend", &amend, N_("amend previous commit")),
[...]
> Thoughts?

I'm not a fan.  I would have trouble remembering what the short option
name means, and it matches the common --jobs option for parallelism
that many commands use.  "git commit --am" works today already and
doesn't run into those problems.

I'm sympathetic to the goal of saving typing, but I'm more sympathetic
to the goal of making user support easier, which is what makes me end
up there.

That said, I've been looking recently at Mercurial's "hg evolve"
extension[1] and I wouldn't be against a well thought out new command
(e.g. "git amend") that does the equivalent of "git commit --amend"
with some related features.  So I think there are some paths forward
that involve abbreviating.

Thanks,
Jonathan

[1] https://www.mercurial-scm.org/wiki/EvolveExtension

  parent reply	other threads:[~2018-08-17  6:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-16 18:31 [PATCH/RFC] commit: add short option for --amend Nguyễn Thái Ngọc Duy
2018-08-16 18:39 ` Jeff King
2018-08-16 18:46   ` Duy Nguyen
2018-08-17  6:47 ` Jonathan Nieder [this message]
2018-08-17 14:33   ` Duy Nguyen
2018-08-17 15:26     ` Jeff King
2018-08-17 15:31       ` Duy Nguyen
2018-08-17 15:31     ` Junio C Hamano
2018-08-18  7:24 ` Simon Ruderich

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=20180817064734.GB131749@aiede.svl.corp.google.com \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /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).