Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Bailey <charles@hashpling.org>2007-12-11 09:47:31 +0300
committerJunio C Hamano <gitster@pobox.com>2007-12-12 21:59:22 +0300
commitd4110a9726c7cd5cda35b7dd03dc8f85fe3dff0c (patch)
tree48ab88c64a89f0fb9ffb1f5217f917115d1f7fa0
parent7c3c79629547195d13e325ea015ce9f89bf461b5 (diff)
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>
-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"