@@ -13,17 +13,22 @@ LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5550'}
13
13
start_httpd
14
14
15
15
test_expect_success ' setup repository' '
16
- echo content >file &&
16
+ echo content1 >file &&
17
17
git add file &&
18
18
git commit -m one
19
+ echo content2 >file &&
20
+ git add file &&
21
+ git commit -m two
19
22
'
20
23
21
- test_expect_success ' create http-accessible bare repository' '
22
- mkdir "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
24
+ test_expect_success ' create http-accessible bare repository with loose objects ' '
25
+ cp -a .git "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
23
26
(cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
24
- git --bare init &&
27
+ git config core.bare true &&
28
+ mkdir -p hooks &&
25
29
echo "exec git update-server-info" >hooks/post-update &&
26
- chmod +x hooks/post-update
30
+ chmod +x hooks/post-update &&
31
+ hooks/post-update
27
32
) &&
28
33
git remote add public "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
29
34
git push public master:master
@@ -87,21 +92,21 @@ test_expect_success 'http auth can use user/pass in URL' '
87
92
expect_askpass none
88
93
'
89
94
90
- test_expect_success ' http auth can use just user in URL' '
95
+ test_expect_failure ' http auth can use just user in URL' '
91
96
>askpass-query &&
92
97
echo user@host >askpass-response &&
93
98
git clone "$HTTPD_URL_USER/auth/repo.git" clone-auth-pass &&
94
99
expect_askpass pass user@host
95
100
'
96
101
97
- test_expect_success ' http auth can request both user and pass' '
102
+ test_expect_failure ' http auth can request both user and pass' '
98
103
>askpass-query &&
99
104
echo user@host >askpass-response &&
100
105
git clone "$HTTPD_URL/auth/repo.git" clone-auth-both &&
101
106
expect_askpass both user@host
102
107
'
103
108
104
- test_expect_success ' http auth respects credential helper config' '
109
+ test_expect_failure ' http auth respects credential helper config' '
105
110
test_config_global credential.helper "!f() {
106
111
cat >/dev/null
107
112
echo username=user@host
@@ -113,15 +118,15 @@ test_expect_success 'http auth respects credential helper config' '
113
118
expect_askpass none
114
119
'
115
120
116
- test_expect_success ' http auth can get username from config' '
121
+ test_expect_failure ' http auth can get username from config' '
117
122
test_config_global "credential.$HTTPD_URL.username" user@host &&
118
123
>askpass-query &&
119
124
echo user@host >askpass-response &&
120
125
git clone "$HTTPD_URL/auth/repo.git" clone-auth-user &&
121
126
expect_askpass pass user@host
122
127
'
123
128
124
- test_expect_success ' configured username does not override URL' '
129
+ test_expect_failure ' configured username does not override URL' '
125
130
test_config_global "credential.$HTTPD_URL.username" wrong &&
126
131
>askpass-query &&
127
132
echo user@host >askpass-response &&
0 commit comments