git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix clone not to ignore depth when performing a local clone
@ 2007-12-11  6:47 Charles Bailey
  2007-12-11 11:54 ` Johannes Schindelin
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Bailey @ 2007-12-11  6:47 UTC (permalink / raw)
  To: git

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>
---
 git-clone.sh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/git-clone.sh b/git-clone.sh
index ecf9d89..fb124d8 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"
-- 
1.5.3.7.2242.gcc945-dirty

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-11 18:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-11  6:47 [PATCH] Fix clone not to ignore depth when performing a local clone Charles Bailey
2007-12-11 11:54 ` Johannes Schindelin
2007-12-11 18:26   ` Charles Bailey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).