@matheusbsbs / matheus-bagliano / commits / 677fa8d115
Fork 0

git-p4 unshelve: adding a commit breaks git-p4 unshelve

git-p4 unshelve uses HEAD^$n to find the parent commit, which fails if there is an additional commit. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Luke Diamand committed Sep 19, 2020 at 09:54 UTC 677fa8d1157c869974355e316d0e2349759d0325
1 file changed +5 -2
t/t9832-unshelve.sh
+5 -2
@@ -29,8 +29,11 @@ test_expect_success 'init depot' '
29 )
30 '
31
32 +# Create an initial clone, with a commit unrelated to the P4 change
33 +# on HEAD
34 test_expect_success 'initial clone' '
33 - git p4 clone --dest="$git" //depot/@all
35 + git p4 clone --dest="$git" //depot/@all &&
36 + test_commit -C "$git" "unrelated"
37 '
38
39 test_expect_success 'create shelved changelist' '
@@ -77,7 +80,7 @@ EOF
80 )
81 '
82
80 -test_expect_success 'update shelved changelist and re-unshelve' '
83 +test_expect_failure 'update shelved changelist and re-unshelve' '
84 test_when_finished cleanup_git &&
85 (
86 cd "$cli" &&