diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2006-09-21 02:10:30 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-20 23:32:22 -0700 |
commit | 199a92186b6721b23a2400c91f8bd44e7ffa349a (patch) | |
tree | 15c92873f4ef6ebd9eaf33463a76331f3076094d /t/t5400-send-pack.sh | |
parent | 9edd7e4652e080a1a3b1ef614d22eba75b39ef87 (diff) | |
download | git-199a92186b6721b23a2400c91f8bd44e7ffa349a.tar.gz |
Document receive.denyNonFastforwards
[jc: with a fix to config handling in t5400 test, which took
annoyingly long to diagnose.]
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t5400-send-pack.sh')
-rwxr-xr-x | t/t5400-send-pack.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh index f3694ac3c7..8afb899717 100755 --- a/t/t5400-send-pack.sh +++ b/t/t5400-send-pack.sh @@ -64,4 +64,18 @@ test_expect_success \ cmp victim/.git/refs/heads/master .git/refs/heads/master ' +unset GIT_CONFIG GIT_CONFIG_LOCAL +HOME=`pwd`/no-such-directory +export HOME ;# this way we force the victim/.git/config to be used. + +test_expect_success \ + 'pushing with --force should be denied with denyNonFastforwards' ' + cd victim && + git-repo-config receive.denyNonFastforwards true && + cd .. && + git-update-ref refs/heads/master master^ && + git-send-pack --force ./victim/.git/ master && + ! diff -u .git/refs/heads/master victim/.git/refs/heads/master +' + test_done |