about summary refs log tree commit diff
path: root/third_party/git/t/t3421-rebase-topology-linear.sh
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
committerVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
commit93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch)
tree85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/t/t3421-rebase-topology-linear.sh
parent6f8fbf4aa4b1654ab27d4829e114538761817de0 (diff)
revert(3p/git): Revert merge of git upstream at v2.26.2 r/852
This causes cgit to serve error pages, which is undesirable.

This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing
changes made to f2b211131f2347342dde63975b09cf603149f1a3.
Diffstat (limited to 'third_party/git/t/t3421-rebase-topology-linear.sh')
-rwxr-xr-xthird_party/git/t/t3421-rebase-topology-linear.sh79
1 files changed, 25 insertions, 54 deletions
diff --git a/third_party/git/t/t3421-rebase-topology-linear.sh b/third_party/git/t/t3421-rebase-topology-linear.sh
index cf8dfd6c203b..7274dca40b1c 100755
--- a/third_party/git/t/t3421-rebase-topology-linear.sh
+++ b/third_party/git/t/t3421-rebase-topology-linear.sh
@@ -26,21 +26,11 @@ test_run_rebase () {
 		test_linear_range 'd e' c..
 	"
 }
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase success -p
 
-test_expect_success 'setup branches and remote tracking' '
-	git tag -l >tags &&
-	for tag in $(cat tags)
-	do
-		git branch branch-$tag $tag || return 1
-	done &&
-	git remote add origin "file://$PWD" &&
-	git fetch origin
-'
-
 test_run_rebase () {
 	result=$1
 	shift
@@ -50,7 +40,7 @@ test_run_rebase () {
 		test_cmp_rev e HEAD
 	"
 }
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -61,13 +51,12 @@ test_run_rebase () {
 	test_expect_$result "rebase $* -f rewrites even if upstream is an ancestor" "
 		reset_rebase &&
 		git rebase $* -f b e &&
-		test_cmp_rev ! e HEAD &&
+		! test_cmp_rev e HEAD &&
 		test_cmp_rev b HEAD~2 &&
 		test_linear_range 'd e' b..
 	"
 }
-test_run_rebase success --apply
-test_run_rebase success --fork-point
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase failure -p
@@ -75,31 +64,13 @@ test_have_prereq !REBASE_P || test_run_rebase failure -p
 test_run_rebase () {
 	result=$1
 	shift
-	test_expect_$result "rebase $* -f rewrites even if remote upstream is an ancestor" "
-		reset_rebase &&
-		git rebase $* -f branch-b branch-e &&
-		test_cmp_rev ! branch-e origin/branch-e &&
-		test_cmp_rev branch-b HEAD~2 &&
-		test_linear_range 'd e' branch-b..
-	"
-}
-test_run_rebase success --apply
-test_run_rebase success --fork-point
-test_run_rebase success -m
-test_run_rebase success -i
-test_have_prereq !REBASE_P || test_run_rebase success -p
-
-test_run_rebase () {
-	result=$1
-	shift
 	test_expect_$result "rebase $* fast-forwards from ancestor of upstream" "
 		reset_rebase &&
 		git rebase $* e b &&
 		test_cmp_rev e HEAD
 	"
 }
-test_run_rebase success --apply
-test_run_rebase success --fork-point
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -139,7 +110,7 @@ test_run_rebase () {
 		test_linear_range 'd i' h..
 	"
 }
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -154,7 +125,7 @@ test_run_rebase () {
 		test_linear_range 'd' h..
 	"
 }
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -169,7 +140,7 @@ test_run_rebase () {
 		test_linear_range 'd i' f..
 	"
 }
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -184,7 +155,7 @@ test_run_rebase () {
 		test_linear_range 'd gp i' h..
 	"
 }
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -205,17 +176,17 @@ test_expect_success 'setup of linear history for empty commit tests' '
 test_run_rebase () {
 	result=$1
 	shift
-	test_expect_$result "rebase $* keeps begin-empty commits" "
+	test_expect_$result "rebase $* drops empty commit" "
 		reset_rebase &&
-		git rebase $* j l &&
-		test_cmp_rev c HEAD~4 &&
-		test_linear_range 'j d k l' c..
+		git rebase $* c l &&
+		test_cmp_rev c HEAD~2 &&
+		test_linear_range 'd l' c..
 	"
 }
-test_run_rebase failure --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
-test_have_prereq !REBASE_P || test_run_rebase failure -p
+test_have_prereq !REBASE_P || test_run_rebase success -p
 
 test_run_rebase () {
 	result=$1
@@ -227,10 +198,10 @@ test_run_rebase () {
 		test_linear_range 'd k l' c..
 	"
 }
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
-test_have_prereq !REBASE_P || test_run_rebase success -p
+test_have_prereq !REBASE_P || test_run_rebase failure -p
 
 test_run_rebase () {
 	result=$1
@@ -242,10 +213,10 @@ test_run_rebase () {
 		test_linear_range 'd k l' j..
 	"
 }
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
-test_have_prereq !REBASE_P || test_run_rebase success -p
+test_have_prereq !REBASE_P || test_run_rebase failure -p
 test_run_rebase success --rebase-merges
 
 #       m
@@ -282,7 +253,7 @@ test_run_rebase () {
 		test_linear_range 'x y' c..
 	"
 }
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -297,7 +268,7 @@ test_run_rebase () {
 		test_linear_range 'x y' c..
 	"
 }
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase failure -p
@@ -312,7 +283,7 @@ test_run_rebase () {
 		test_linear_range 'x y' m..
 	"
 }
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -328,7 +299,7 @@ test_run_rebase () {
 	"
 }
 
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase failure -p
@@ -343,7 +314,7 @@ test_run_rebase () {
 		test_linear_range 'x y' m..
 	"
 }
-test_run_rebase success --apply
+test_run_rebase success ''
 test_run_rebase success -m
 test_run_rebase success -i
 test_have_prereq !REBASE_P || test_run_rebase failure -p
@@ -368,7 +339,7 @@ test_run_rebase () {
 	test_expect_$result "rebase $* -f --root on linear history causes re-write" "
 		reset_rebase &&
 		git rebase $* -f --root c &&
-		test_cmp_rev ! a HEAD~2 &&
+		! test_cmp_rev a HEAD~2 &&
 		test_linear_range 'a b c' HEAD
 	"
 }