Skip to content

Commit 8ee09ac

Browse files
dschogitster
authored andcommitted
t5540: clarify that http-push does not handle packed-refs on the remote
Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 466ddf9 commit 8ee09ac

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

t/t5540-http-push.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,29 @@ test_expect_success 'clone remote repository' '
5151
git clone $HTTPD_URL/test_repo.git test_repo_clone
5252
'
5353

54-
test_expect_failure 'push to remote repository' '
54+
test_expect_failure 'push to remote repository with packed refs' '
5555
cd "$ROOT_PATH"/test_repo_clone &&
5656
: >path2 &&
5757
git add path2 &&
5858
test_tick &&
5959
git commit -m path2 &&
60+
HEAD=$(git rev-parse --verify HEAD) &&
6061
git push &&
61-
[ -f "$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git/refs/heads/master" ]
62+
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
63+
test $HEAD = $(git rev-parse --verify HEAD))
6264
'
6365

64-
test_expect_failure 'create and delete remote branch' '
66+
test_expect_success ' push to remote repository with unpacked refs' '
67+
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
68+
rm packed-refs &&
69+
git update-ref refs/heads/master \
70+
0c973ae9bd51902a28466f3850b543fa66a6aaf4) &&
71+
git push &&
72+
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
73+
test $HEAD = $(git rev-parse --verify HEAD))
74+
'
75+
76+
test_expect_success 'create and delete remote branch' '
6577
cd "$ROOT_PATH"/test_repo_clone &&
6678
git checkout -b dev &&
6779
: >path3 &&

0 commit comments

Comments
 (0)