aboutsummaryrefslogtreecommitdiff
path: root/t/lib-httpd.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-08-01 11:05:02 -0700
committerJunio C Hamano <gitster@pobox.com>2013-08-01 11:10:36 -0700
commite69fa70f486f437788feef71f8b83c286ae5e701 (patch)
treef853a38f87c41dbfb7dda350c10fde3e9f47196f /t/lib-httpd.sh
parentd887cc184d49f5e8982c1db433996fae26fb20c0 (diff)
downloadgit-e69fa70f486f437788feef71f8b83c286ae5e701.tar.gz
git-e69fa70f486f437788feef71f8b83c286ae5e701.tar.xz
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 <gitster@pobox.com>
Diffstat (limited to 't/lib-httpd.sh')
-rw-r--r--t/lib-httpd.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index 895b9258b..e2eca1fad 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -167,6 +167,22 @@ test_http_push_nonff() {
test_expect_success 'non-fast-forward push shows help message' '
test_i18ngrep "Updates were rejected because" output
'
+
+ test_expect_failure 'force with lease aka cas' '
+ HEAD=$( cd "$REMOTE_REPO" && git rev-parse --verify HEAD ) &&
+ test_when_finished '\''
+ (cd "$REMOTE_REPO" && git update-ref HEAD "$HEAD")
+ '\'' &&
+ (
+ cd "$LOCAL_REPO" &&
+ git push -v --force-with-lease=$BRANCH:$HEAD origin
+ ) &&
+ git rev-parse --verify "$BRANCH" >expect &&
+ (
+ cd "$REMOTE_REPO" && git rev-parse --verify HEAD
+ ) >actual &&
+ test_cmp expect actual
+ '
}
setup_askpass_helper() {