aboutsummaryrefslogtreecommitdiff
path: root/t/t5521-pull-options.sh
diff options
context:
space:
mode:
authorPaul Tan <pyokagan@gmail.com>2015-05-29 19:44:44 +0800
committerJunio C Hamano <gitster@pobox.com>2015-05-29 09:16:01 -0700
commit5504f13a7c1e0a0ed486aecfdcc45b150528693e (patch)
tree5608e2f347644d680a19cd51511f69ac4f7fc070 /t/t5521-pull-options.sh
parentfa14ee77ac7b0e4d16ede822015cad32f34b6c7f (diff)
downloadgit-5504f13a7c1e0a0ed486aecfdcc45b150528693e.tar.gz
git-5504f13a7c1e0a0ed486aecfdcc45b150528693e.tar.xz
t5521: test --dry-run does not make any changes
Test that when --dry-run is provided to git-pull, it does not make any changes, namely: * --dry-run gets passed to git-fetch, so no FETCH_HEAD will be created and no refs will be fetched. * The index and work tree will not be modified. Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5521-pull-options.sh')
-rwxr-xr-xt/t5521-pull-options.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh
index 453aba53f..56e737718 100755
--- a/t/t5521-pull-options.sh
+++ b/t/t5521-pull-options.sh
@@ -117,4 +117,17 @@ test_expect_success 'git pull --all' '
)
'
+test_expect_success 'git pull --dry-run' '
+ test_when_finished "rm -rf clonedry" &&
+ git init clonedry &&
+ (
+ cd clonedry &&
+ git pull --dry-run ../parent &&
+ test_path_is_missing .git/FETCH_HEAD &&
+ test_path_is_missing .git/refs/heads/master &&
+ test_path_is_missing .git/index &&
+ test_path_is_missing file
+ )
+'
+
test_done