Re: rebase -p confusion in 1.6.1
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 15, 2009, 13:34 UTC
- Message-ID
- <alpine.DEB.1.00.0901151429440.3586@pacific.mpi-cbg.de>
- In-Reply-To
- <slrngmu4j5.e1u.sitaramc@sitaramc.homelinux.net>
Hi,
On Thu, 15 Jan 2009, Sitaram Chamarty wrote:
Show 5 quoted lines
> While trying to understand "rebase -p", I came across some > very unexpected behaviour that made me throw in the towel > and ask for help! > > [... some script with some aliases ...]
I turned this into a proper test case (to show what would be most helpful if you report bugs like this in the future).
If nobody beats me to it, I'll work on it tonight.
-- snipsnap -- t/t3409-rebase-preserve-merges.sh | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh index e6c8327..5e2128c 100755 --- a/t/t3409-rebase-preserve-merges.sh +++ b/t/t3409-rebase-preserve-merges.sh @@ -92,4 +92,32 @@ test_expect_success '--continue works after a conflict' ' ) ' +test_commit () { + : > "$1" && + git add "$1" && + test_tick && + git commit -m "$1" "$1" +} + +test_expect_success 'test case from Sitaram' ' + + git checkout master && + test_commit a1 && + git checkout -b work && + test_commit b1 && + git checkout master && + test_commit a3 && + git checkout work && + git merge master && + test_commit b3 && + echo before: && + git log --graph --pretty=oneline --decorate --abbrev-commit && + test -f b3 && + git rebase -p master && + echo after: && + git log --graph --pretty=oneline --decorate --abbrev-commit && + test -f b3 + +' + test_done