aboutsummaryrefslogtreecommitdiff
path: root/git-clone.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-08-20 15:35:15 -0700
committerJunio C Hamano <gitster@pobox.com>2007-08-20 15:35:15 -0700
commit23d53358be51bb256699f4d237619a3ee8addf39 (patch)
tree734c08f0d3d9371cffb39b37b314f8b586bc770c /git-clone.sh
parent2be7fcb4764f2dbcee52635b91fedb1b3dcf7ab4 (diff)
downloadgit-23d53358be51bb256699f4d237619a3ee8addf39.tar.gz
git-23d53358be51bb256699f4d237619a3ee8addf39.tar.xz
git clone: do not issue warning while cloning locally across filesystems
Unless the user explicitly asked hardlinking with the '-l' option, we should not say "oops we cannot hardlink as you asked so we are copying". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-clone.sh')
-rwxr-xr-xgit-clone.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-clone.sh b/git-clone.sh
index e4a9ac4ba..18003ab4b 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -99,6 +99,7 @@ origin_override=
use_separate_remote=t
depth=
no_progress=
+local_explicitly_asked_for=
test -t 1 || no_progress=--no-progress
while
case "$#,$1" in
@@ -109,6 +110,7 @@ while
*,--na|*,--nak|*,--nake|*,--naked|\
*,-b|*,--b|*,--ba|*,--bar|*,--bare) bare=yes ;;
*,-l|*,--l|*,--lo|*,--loc|*,--loca|*,--local)
+ local_explicitly_asked_for=yes
use_local_hardlink=yes ;;
*,--no-h|*,--no-ha|*,--no-har|*,--no-hard|*,--no-hardl|\
*,--no-hardli|*,--no-hardlin|*,--no-hardlink|*,--no-hardlinks)
@@ -281,7 +283,8 @@ yes)
then
rm -f "$GIT_DIR/objects/sample"
l=l
- else
+ elif test -n "$local_explicitly_asked_for"
+ then
echo >&2 "Warning: -l asked but cannot hardlink to $repo"
fi
fi &&