summaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2010-02-25 20:03:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-02-25 20:27:38 (GMT)
commit3fdcdbdf301dadb7af58fe038501f0af6419a2e0 (patch)
treea93e6858dfc1b9db2bd6fd71eff8a3ece8d2f9d5 /t/t5510-fetch.sh
parent251a4951a20b23760c3ccf3f3122d4394ab37357 (diff)
downloadgit-3fdcdbdf301dadb7af58fe038501f0af6419a2e0.zip
git-3fdcdbdf301dadb7af58fe038501f0af6419a2e0.tar.gz
git-3fdcdbdf301dadb7af58fe038501f0af6419a2e0.tar.bz2
Windows: redirect f[re]open("/dev/null") to f[re]open("nul")
On Windows, the equivalent of "/dev/null" is "nul". This implements compatibility wrappers around fopen() and freopen() that check for this particular file name. The new tests exercise code paths where this is relevant. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 169af1e..721821e 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -341,6 +341,13 @@ test_expect_success 'fetch into the current branch with --update-head-ok' '
'
+test_expect_success 'fetch --dry-run' '
+
+ rm -f .git/FETCH_HEAD &&
+ git fetch --dry-run . &&
+ ! test -f .git/FETCH_HEAD
+'
+
test_expect_success "should be able to fetch with duplicate refspecs" '
mkdir dups &&
cd dups &&