From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: git@vger.kernel.org
Cc: entwicklung@pengutronix.de
Subject: Bug in rebase --autosquash
Date: Wed, 17 Aug 2022 11:49:09 +0200 [thread overview]
Message-ID: <20220817094909.v2ev4rpsmxjnii4x@pengutronix.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]
Hello,
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?
When the original commit is in the range (i.e. with
git rebase -i --autosquash --root
) it does the right thing, i.e. my editor then has:
pick 0c1d21698c38 file with content
fixup ef8f0bd27a56 fixup! file with content
fixup b40a214bf5fb fixup! fixup! file with content
. Unrelated to that, but annoying is, that
git rebase --autosquash --root
doesn't do the right thing. It doesn't change the history at all, while
I expected it to only contain a single commit then.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2022-08-17 9:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 9:49 Uwe Kleine-König [this message]
2022-08-17 19:40 ` Bug in rebase --autosquash Felipe Contreras
2022-08-19 11:09 ` Johannes Schindelin
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=20220817094909.v2ev4rpsmxjnii4x@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=entwicklung@pengutronix.de \
--cc=git@vger.kernel.org \
/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).