git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Martin Ågren" <martin.agren@gmail.com>
To: Phillip Wood <phillip.wood@dunelm.org.uk>
Cc: Taylor Blau <me@ttaylorr.com>,
	Charvi Mendiratta <charvi077@gmail.com>,
	git <git@vger.kernel.org>,
	Christian Couder <christian.couder@gmail.com>
Subject: Re: How to implement the "amend!" commit ?
Date: Fri, 15 Jan 2021 19:05:05 +0100	[thread overview]
Message-ID: <CAN0heSqnaOi+2k_2mtKBW4wPoGSZ=nAkt1wQaeocgKy9s7b45g@mail.gmail.com> (raw)
In-Reply-To: <0236bb58-61a7-6126-b50f-93e8b6bf3aef@gmail.com>

On Fri, 15 Jan 2021 at 12:08, Phillip Wood <phillip.wood123@gmail.com> wrote:
>
> On 14/01/2021 17:32, Taylor Blau wrote:
> > On Thu, Jan 14, 2021 at 10:39:50AM +0000, Phillip Wood wrote:
> >>> Secondly, As an alternative to above, we can use `--fixup=<commit>
> >>> --amend` and `--fixup=<commit> --reword`.
> >>
> >> This is not backwards compatible. At the moment If you create a fixup with
> >> `git commit --fixup=aaa` and then realize it should refer to commit bbb
> >> instead you can fix it with `git commit --amend --fixup=bbb`. That would no
> >> longer be possible.
> >
> > Too bad. I felt that this was the most ergonomic idea put forwards, but
> > I also thought that we died with '--amend --fixup=xxx'. Its current
> > behavior does make sense to me, but it's too bad that we can't use it
> > for this new purpose.
>
> I guess we could decide to change the behavior but I'm not sure there is
> a sufficiently compelling reason to do that. I agree the current
> behavior makes sense but (based on no data at all) I'm not sure that it
> is used very much. [...]

Data point: I've done this more than once to correct my choice of which
commit to fixup. I'd like to think I'm not very special, so I would
guess that I'm not the *only one* who has come up with that and found it
useful. As for being used "very much", no idea.

But regardless of that, it feels awkward to me to tie those two options
together. That feeling might well correlate with having found that
combo to be useful in the first place, though.



Martin

  reply	other threads:[~2021-01-15 18:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPSFM5c2iqBn8_Dih2id7q6RRp0q=vfCSVUHDE5AOXZ8z3Ko9w@mail.gmail.com>
2021-01-13  1:15 ` How to implement the "amend!" commit ? Charvi Mendiratta
2021-01-13 18:24   ` Taylor Blau
2021-01-13 18:27     ` Taylor Blau
2021-01-14  8:06     ` Charvi Mendiratta
2021-01-14 10:39   ` Phillip Wood
2021-01-14 17:32     ` Taylor Blau
2021-01-15 10:42       ` Phillip Wood
2021-01-15 18:05         ` Martin Ågren [this message]
2021-01-14 20:32     ` Junio C Hamano
2021-01-15 10:29       ` Phillip Wood
2021-01-15 17:23         ` Junio C Hamano
2021-01-17  3:43       ` Charvi Mendiratta
2021-01-17  4:33         ` Junio C Hamano
2021-01-17  7:46           ` Charvi Mendiratta
2021-01-15  8:37     ` Charvi Mendiratta

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='CAN0heSqnaOi+2k_2mtKBW4wPoGSZ=nAkt1wQaeocgKy9s7b45g@mail.gmail.com' \
    --to=martin.agren@gmail.com \
    --cc=charvi077@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.com \
    --cc=phillip.wood@dunelm.org.uk \
    /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).