Skip to content

Commit

Permalink
Fix clone not to ignore depth when performing a local clone
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Charles Bailey authored and Junio C Hamano committed Dec 12, 2007
1 parent 7c3c796 commit d4110a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d4110a9

Please sign in to comment.