File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -51,17 +51,29 @@ test_expect_success 'clone remote repository' '
51
51
git clone $HTTPD_URL/test_repo.git test_repo_clone
52
52
'
53
53
54
- test_expect_failure ' push to remote repository' '
54
+ test_expect_failure ' push to remote repository with packed refs ' '
55
55
cd "$ROOT_PATH"/test_repo_clone &&
56
56
: >path2 &&
57
57
git add path2 &&
58
58
test_tick &&
59
59
git commit -m path2 &&
60
+ HEAD=$(git rev-parse --verify HEAD) &&
60
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))
62
64
'
63
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' '
65
77
cd "$ROOT_PATH"/test_repo_clone &&
66
78
git checkout -b dev &&
67
79
: >path3 &&
You can’t perform that action at this time.
0 commit comments