From: Duy Nguyen <pclouds@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>, Jeff King <peff@peff.net>
Subject: Re: [PATCH/RFC] commit: add short option for --amend
Date: Fri, 17 Aug 2018 16:33:30 +0200 [thread overview]
Message-ID: <CACsJy8Di4GQLqkBmcnrfmU9aS=wizxU36Ly0BRgDEDmFG=+2Fg@mail.gmail.com> (raw)
In-Reply-To: <20180817064734.GB131749@aiede.svl.corp.google.com>
On Fri, Aug 17, 2018 at 8:47 AM Jonathan Nieder <jrnieder@gmail.com> wrote:
>
> 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.
The alternative is -A or -M which may be easier associated with
--amend. That "--am" also would break the moment somebody adds
--amsomething.
> 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.
I'm not opposed to a new command like this, but I don't think it
should stop us from adding short options.
--
Duy
next prev parent reply other threads:[~2018-08-17 14:33 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
2018-08-17 14:33 ` Duy Nguyen [this message]
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='CACsJy8Di4GQLqkBmcnrfmU9aS=wizxU36Ly0BRgDEDmFG=+2Fg@mail.gmail.com' \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@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).