From d4110a9726c7cd5cda35b7dd03dc8f85fe3dff0c Mon Sep 17 00:00:00 2001 From: Charles Bailey Date: Tue, 11 Dec 2007 06:47:31 +0000 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- git-clone.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-clone.sh b/git-clone.sh index 96a356d8b..68085a322 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" -- 2.30.2