Skip to content

Commit 677fa8d

Browse files
luked99gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 47ae905 commit 677fa8d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

t/t9832-unshelve.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ test_expect_success 'init depot' '
2929
)
3030
'
3131

32+
# Create an initial clone, with a commit unrelated to the P4 change
33+
# on HEAD
3234
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"
3437
'
3538

3639
test_expect_success 'create shelved changelist' '
@@ -77,7 +80,7 @@ EOF
7780
)
7881
'
7982

80-
test_expect_success 'update shelved changelist and re-unshelve' '
83+
test_expect_failure 'update shelved changelist and re-unshelve' '
8184
test_when_finished cleanup_git &&
8285
(
8386
cd "$cli" &&

0 commit comments

Comments
 (0)