summaryrefslogtreecommitdiff
path: root/git-clone.sh
diff options
context:
space:
mode:
authorCharles Bailey <charles@hashpling.org>2007-12-11 06:47:31 +0000
committerJunio C Hamano <gitster@pobox.com>2007-12-12 10:59:22 -0800
commitd4110a9726c7cd5cda35b7dd03dc8f85fe3dff0c (patch)
tree48ab88c64a89f0fb9ffb1f5217f917115d1f7fa0 /git-clone.sh
parent7c3c79629547195d13e325ea015ce9f89bf461b5 (diff)
downloadgit-d4110a9726c7cd5cda35b7dd03dc8f85fe3dff0c.tar.gz
Fix clone not to ignore depth when performing a local clone
When git-clone detects that it can perform a local clone it follows a path that silently ignores the depth parameter. Presumably if the user explicitly requests a shallow clone they have a reason to prefer a space efficient clone of just the recent history so bypass the local magic if the user specifies the depth parameter. Signed-off-by: Charles Bailey <charles@hashpling.org> 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 96a356d8b3..68085a3225 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -205,7 +205,10 @@ fi
# it is local
if base=$(get_repo_base "$repo"); then
repo="$base"
- local=yes
+ if test -z "$depth"
+ then
+ local=yes
+ fi
fi
dir="$2"