1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-25 04:16:09 +02:00

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>
This commit is contained in:
Charles Bailey 2007-12-11 06:47:31 +00:00 committed by Junio C Hamano
parent 7c3c796295
commit d4110a9726

View File

@ -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"