summaryrefslogtreecommitdiff
path: root/t/t5701-clone-local.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5701-clone-local.sh')
-rwxr-xr-xt/t5701-clone-local.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh
index b0933274db..a3026ec4fc 100755
--- a/t/t5701-clone-local.sh
+++ b/t/t5701-clone-local.sh
@@ -43,4 +43,21 @@ test_expect_success 'local clone from x.git that does not exist' '
fi
'
+test_expect_success 'With -no-hardlinks, local will make a copy' '
+ cd "$D" &&
+ git clone --bare --no-hardlinks x w &&
+ cd w &&
+ linked=$(find objects -type f ! -links 1 | wc -l) &&
+ test "$linked" = 0
+'
+
+test_expect_success 'Even without -l, local will make a hardlink' '
+ cd "$D" &&
+ rm -fr w &&
+ git clone -l --bare x w &&
+ cd w &&
+ copied=$(find objects -type f -links 1 | wc -l) &&
+ test "$copied" = 0
+'
+
test_done