t5540: clarify that http-push does not handle packed-refs on the remote
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jan 17, 2009 at 16:41 UTC
8ee09acd8f3c96683ce2b81bb8ac8079f0e8a4fd
1 file changed
+15
-3
t/t5540-http-push.sh
+15
-3
@@ -51,17 +51,29 @@ test_expect_success 'clone remote repository' '
51
git clone $HTTPD_URL/test_repo.git test_repo_clone
52
'
53
54
-test_expect_failure 'push to remote repository' '
54
+test_expect_failure 'push to remote repository with packed refs' '
55
cd "$ROOT_PATH"/test_repo_clone &&
56
: >path2 &&
57
git add path2 &&
58
test_tick &&
59
git commit -m path2 &&
60
+ HEAD=$(git rev-parse --verify HEAD) &&
61
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))
64
'
65
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' '
77
cd "$ROOT_PATH"/test_repo_clone &&
78
git checkout -b dev &&
79
: >path3 &&