From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: git@vger.kernel.org, entwicklung@pengutronix.de
Subject: Re: Bug in rebase --autosquash
Date: Fri, 19 Aug 2022 13:09:00 +0200 (CEST) [thread overview]
Message-ID: <8p78q4p9-9ro4-p5s4-r738-7sno17rqr414@tzk.qr> (raw)
In-Reply-To: <20220817094909.v2ev4rpsmxjnii4x@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]
Hi Uwe,
On Wed, 17 Aug 2022, Uwe Kleine-König wrote:
> after:
>
> uwe@taurus:~/tmp/git$ git version
> git version 2.37.2
> uwe@taurus:~/tmp/git$ git init
> Initialized empty Git repository in /home/uwe/tmp/git/.git/
> uwe@taurus:~/tmp/git$ echo contnt > file
> uwe@taurus:~/tmp/git$ git add file
> uwe@taurus:~/tmp/git$ git commit -m 'file with content'
> ...
> uwe@taurus:~/tmp/git$ echo 'content' > file
> uwe@taurus:~/tmp/git$ git commit --fixup=@ file
> [main ef8f0bd27a56] fixup! file with content
> uwe@taurus:~/tmp/git$ echo 'more content' >> file
> uwe@taurus:~/tmp/git$ git commit --fixup=@ file
> [main b40a214bf5fb] fixup! fixup! file with content
> 1 file changed, 1 insertion(+)
>
> running
>
> git rebase -i --autosquash @~2
>
> my editor presents me with:
>
> pick ef8f0bd27a56 fixup! file with content
> pick b40a214bf5fb fixup! fixup! file with content
>
> However I would have expected
>
> pick ef8f0bd27a56 fixup! file with content
> fixup b40a214bf5fb fixup! fixup! file with content
>
> instead.
>
> Is this a feature I don't understand?
This demonstrates a somewhat obscure feature where the `fixup!` of a
`fixup!` magically targets the original commit.
I understand that it is somewhat unintuitive that `fixup! fixup! abc` does
not target `fixup! abc` but instead `abc`, but that's how the tool has
been behaving forever.
Ciao,
Dscho
next prev parent reply other threads:[~2022-08-19 11:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 9:49 Bug in rebase --autosquash Uwe Kleine-König
2022-08-17 19:40 ` Felipe Contreras
2022-08-19 11:09 ` Johannes Schindelin [this message]
2022-08-19 16:53 ` 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=8p78q4p9-9ro4-p5s4-r738-7sno17rqr414@tzk.qr \
--to=johannes.schindelin@gmx.de \
--cc=entwicklung@pengutronix.de \
--cc=git@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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).