Skip to content

Commit fe4bc2a

Browse files
rctaygitster
authored andcommitted
t5541-http-push: check that ref is unchanged for non-ff test
Signed-off-by: Tay Ray Chuan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e923eae commit fe4bc2a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

t/t5541-http-push.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,17 @@ test_expect_success 'used receive-pack service' '
8989
'
9090

9191
test_expect_success 'non-fast-forward push fails' '
92+
cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
93+
HEAD=$(git rev-parse --verify HEAD) &&
94+
9295
cd "$ROOT_PATH"/test_repo_clone &&
9396
git checkout master &&
9497
echo "changed" > path2 &&
9598
git commit -a -m path2 --amend &&
9699
97-
HEAD=$(git rev-parse --verify HEAD) &&
98100
!(git push -v origin >output 2>&1) &&
99101
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
100-
test $HEAD != $(git rev-parse --verify HEAD))
102+
test $HEAD = $(git rev-parse --verify HEAD))
101103
'
102104

103105
test_expect_success 'non-fast-forward push show ref status' '

0 commit comments

Comments
 (0)