mirror of
https://github.com/git/git.git
synced 2024-10-30 13:57:54 +01:00
clone: better error when --reference is a linked checkout
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
744e469755
commit
d78db8424e
1 changed files with 6 additions and 1 deletions
|
@ -294,9 +294,14 @@ static int add_one_reference(struct string_list_item *item, void *cb_data)
|
|||
char *ref_git_git = mkpathdup("%s/.git", ref_git);
|
||||
free(ref_git);
|
||||
ref_git = ref_git_git;
|
||||
} else if (!is_directory(mkpath("%s/objects", ref_git)))
|
||||
} else if (!is_directory(mkpath("%s/objects", ref_git))) {
|
||||
struct strbuf sb = STRBUF_INIT;
|
||||
if (get_common_dir(&sb, ref_git))
|
||||
die(_("reference repository '%s' as a linked checkout is not supported yet."),
|
||||
item->string);
|
||||
die(_("reference repository '%s' is not a local repository."),
|
||||
item->string);
|
||||
}
|
||||
|
||||
if (!access(mkpath("%s/shallow", ref_git), F_OK))
|
||||
die(_("reference repository '%s' is shallow"), item->string);
|
||||
|
|
Loading…
Reference in a new issue