From: Junio C Hamano <gitster@pobox.com>
To: John Cai <johncai86@gmail.com>
Cc: Michael McClimon <michael@mcclimon.org>, git@vger.kernel.org
Subject: Re: Bug with rebase and commit hashes
Date: Thu, 10 Mar 2022 14:55:10 -0800 [thread overview]
Message-ID: <xmqqsfrpbepd.fsf@gitster.g> (raw)
In-Reply-To: <C92B297B-0634-40CC-B1C6-B2A7325BF7DA@gmail.com> (John Cai's message of "Thu, 10 Mar 2022 17:25:16 -0500")
John Cai <johncai86@gmail.com> writes:
>> I hit this in production on git 2.30.2 (debian bullseye), but reproduced
>> locally using the latest git main, which is git version 2.35.1.415.gc2162907.
>> In both cases I wiped my user gitconfig, so I'm using only the defaults. (If
>> it helps: with my rebase.autosquash = true, the bad case above does not behave
>> badly and leaves me in detached head as I'd expect.) It's totally possible
>> this isn't _meant_ to work, in which case I think the docs could use an
>> update.
A quick bisect session leads us to 176f5d96 (built-in rebase
--autostash: leave the current branch alone if possible,
2018-11-07), but I do not know how much commonality exists in the
current code (read: we may well have inherited the bug from there,
or we rewrote it completely away but reinvented the same bug in the
current code).
with this test script dropped as t/x9999-c.sh
--- >8 ---
#!/bin/sh
test_description='rebase???'
. ./test-lib.sh
test_expect_success setup '
git init &&
>file &&
git add file &&
git commit -m initial &&
git checkout -b side &&
echo >>file &&
git commit -a -m side &&
git checkout master &&
git tag hold
'
test_expect_success rebase '
git checkout -B master hold &&
git rev-parse master >pre &&
git rebase $(git rev-parse master) $(git rev-parse side) &&
git rev-parse master >post &&
test_cmp pre post
'
test_done
--- 8< ---
and this as "git bisect run ./runme.sh" script:
--- >8 ---
#!/bin/sh
make -j16 NO_OPENSSL=Yes CFLAGS="-g -O" || exit 125
cd t && sh -v ./x9999-c.sh -i -v
--- 8< ---
The NO_OPENSSL thing is there only because I started bisecting from
an ancient version that no longer compiles out of the box in my
environment.
prev parent reply other threads:[~2022-03-10 22:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 16:16 Bug with rebase and commit hashes Michael McClimon
2022-03-10 22:25 ` John Cai
2022-03-10 22:46 ` John Cai
2022-03-12 3:10 ` Michael McClimon
2022-03-12 13:32 ` John Cai
2022-03-12 14:21 ` Michael McClimon
2022-03-10 22:55 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqsfrpbepd.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=johncai86@gmail.com \
--cc=michael@mcclimon.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.
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 NNTP newsgroup(s).