aboutsummaryrefslogtreecommitdiff
path: root/t/t3421-rebase-topology-linear.sh
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2016-04-20 18:20:56 +0000
committerJunio C Hamano <gitster@pobox.com>2016-04-24 12:05:08 -0700
commit79f43447d2b542d1e521987287822ff376d43e93 (patch)
tree177184ad1892016739134ff51c2e8748d217c00e /t/t3421-rebase-topology-linear.sh
parent6a6636270fbaf74609cd3e1bd207dd2c420d640a (diff)
downloadgit-79f43447d2b542d1e521987287822ff376d43e93.tar.gz
git-79f43447d2b542d1e521987287822ff376d43e93.tar.xz
git-rebase--merge: don't include absent parent as a base
Absent this fix, attempts to rebase an orphan branch using "rebase -m" fails with: $ git rebase -m ORPHAN_TARGET_BASE First, rewinding head to replay your work on top of it... fatal: Could not parse object 'ORPHAN_ROOT_SHA^' Unknown exit code (128) from command: git-merge-recursive ORPHAN_ROOT_SHA^ -- HEAD ORPHAN_ROOT_SHA To fix, this will only include the rebase root's parent as a base if it exists, so that in cases of rebasing an orphan branch, it is a simple two-way merge. Note the default rebase behavior does not fail: $ git rebase ORPHAN_TARGET_BASE First, rewinding head to replay your work on top of it... Applying: ORPHAN_ROOT_COMMIT_MSG Using index info to reconstruct a base tree... A few tests were expecting the old behaviour to forbid rebasing such a history with "rebase -m", which now need to expect them to succeed. Signed-off-by: Ben Woosley <ben.woosley@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3421-rebase-topology-linear.sh')
-rwxr-xr-xt/t3421-rebase-topology-linear.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t3421-rebase-topology-linear.sh b/t/t3421-rebase-topology-linear.sh
index 9c55cba19..68fe2003e 100755
--- a/t/t3421-rebase-topology-linear.sh
+++ b/t/t3421-rebase-topology-linear.sh
@@ -253,7 +253,7 @@ test_run_rebase () {
"
}
test_run_rebase success ''
-test_run_rebase failure -m
+test_run_rebase success -m
test_run_rebase success -i
test_run_rebase success -p
@@ -268,7 +268,7 @@ test_run_rebase () {
"
}
test_run_rebase success ''
-test_run_rebase failure -m
+test_run_rebase success -m
test_run_rebase success -i
test_run_rebase failure -p