Skip to content

Commit e69fa70

Browse files
committed
t5540/5541: smart-http does not support "--force-with-lease"
The push() method in remote-curl.c is not told and does not pass the necessary information to underlying send-pack, so this extension does not yet work. Leave a note in the test suite. Signed-off-by: Junio C Hamano <[email protected]>
1 parent d887cc1 commit e69fa70

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

t/lib-httpd.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,22 @@ test_http_push_nonff() {
167167
test_expect_success 'non-fast-forward push shows help message' '
168168
test_i18ngrep "Updates were rejected because" output
169169
'
170+
171+
test_expect_failure 'force with lease aka cas' '
172+
HEAD=$( cd "$REMOTE_REPO" && git rev-parse --verify HEAD ) &&
173+
test_when_finished '\''
174+
(cd "$REMOTE_REPO" && git update-ref HEAD "$HEAD")
175+
'\'' &&
176+
(
177+
cd "$LOCAL_REPO" &&
178+
git push -v --force-with-lease=$BRANCH:$HEAD origin
179+
) &&
180+
git rev-parse --verify "$BRANCH" >expect &&
181+
(
182+
cd "$REMOTE_REPO" && git rev-parse --verify HEAD
183+
) >actual &&
184+
test_cmp expect actual
185+
'
170186
}
171187

172188
setup_askpass_helper() {

0 commit comments

Comments
 (0)