Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-09-30 07:19:23 +0300
committerJunio C Hamano <gitster@pobox.com>2019-09-30 07:19:23 +0300
commit0281733483c19e5bcd58b0e148707b9fb7f8c20a (patch)
tree5bfcb1cd5783109fa1db86eb7680397c1f9fe124 /t/t3404-rebase-interactive.sh
parentf06fb376edd87a6c6d3d0fb8cd412d879646fbab (diff)
parent0c37c41d1395fac7e715d1b6859828e2c0bf00f4 (diff)
Merge branch 'bc/hash-independent-tests-part-5'
Preparation for SHA-256 upgrade continues in the test department. * bc/hash-independent-tests-part-5: t4009: make hash size independent t4002: make hash independent t4000: make hash size independent t3903: abstract away SHA-1-specific constants t3800: make hash-size independent t3600: make hash size independent t3506: make hash independent t3430: avoid hard-coded object IDs t3404: abstract away SHA-1-specific constants t3306: abstract away SHA-1-specific constants t3305: make hash size independent t3301: abstract away SHA-1-specific constants t3206: abstract away hash size constants t3201: abstract away SHA-1-specific constants
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 31114d0bbb..3ea67d75b5 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -29,9 +29,6 @@ Initial setup:
. "$TEST_DIRECTORY"/lib-rebase.sh
-# WARNING: Modifications to the initial repository can change the SHA ID used
-# in the expect2 file for the 'stop on conflicting pick' test.
-
test_expect_success 'setup' '
test_commit A file1 &&
test_commit B file1 &&
@@ -231,25 +228,28 @@ test_expect_success 'exchange two commits' '
set_fake_editor &&
FAKE_LINES="2 1" git rebase -i HEAD~2 &&
test H = $(git cat-file commit HEAD^ | sed -ne \$p) &&
- test G = $(git cat-file commit HEAD | sed -ne \$p)
+ test G = $(git cat-file commit HEAD | sed -ne \$p) &&
+ blob1=$(git rev-parse --short HEAD^:file1) &&
+ blob2=$(git rev-parse --short HEAD:file1) &&
+ commit=$(git rev-parse --short HEAD)
'
test_expect_success 'stop on conflicting pick' '
- cat >expect <<-\EOF &&
+ cat >expect <<-EOF &&
diff --git a/file1 b/file1
- index f70f10e..fd79235 100644
+ index $blob1..$blob2 100644
--- a/file1
+++ b/file1
@@ -1 +1 @@
-A
+G
EOF
- cat >expect2 <<-\EOF &&
+ cat >expect2 <<-EOF &&
<<<<<<< HEAD
D
=======
G
- >>>>>>> 5d18e54... G
+ >>>>>>> $commit... G
EOF
git tag new-branch1 &&
set_fake_editor &&
@@ -1001,7 +1001,7 @@ test_expect_success 'rebase -i --root temporary sentinel commit' '
git checkout B &&
set_fake_editor &&
test_must_fail env FAKE_LINES="2" git rebase -i --root &&
- git cat-file commit HEAD | grep "^tree 4b825dc642cb" &&
+ git cat-file commit HEAD | grep "^tree $EMPTY_TREE" &&
git rebase --abort
'
@@ -1159,7 +1159,7 @@ test_expect_success 'rebase -i error on commits with \ in message' '
test_expect_code 1 grep " emp" error
'
-test_expect_success 'short SHA-1 setup' '
+test_expect_success SHA1 'short SHA-1 setup' '
test_when_finished "git checkout master" &&
git checkout --orphan collide &&
git rm -rf . &&
@@ -1171,7 +1171,7 @@ test_expect_success 'short SHA-1 setup' '
)
'
-test_expect_success 'short SHA-1 collide' '
+test_expect_success SHA1 'short SHA-1 collide' '
test_when_finished "reset_rebase && git checkout master" &&
git checkout collide &&
(