зеркало из https://github.com/microsoft/git.git
refs.c: use is_dir_sep() in resolve_gitlink_ref()
The "submodule" argument in this function is a path, which can have either '/' or '\\' as a separator. Use is_dir_sep() to support both. Noticed-by: Johannes Sixt <j6t@kdbg.org> 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:
Родитель
ff9445be47
Коммит
ee394bd376
2
refs.c
2
refs.c
|
@ -1507,7 +1507,7 @@ int resolve_gitlink_ref(const char *submodule, const char *refname,
|
|||
struct ref_store *refs;
|
||||
int flags;
|
||||
|
||||
while (len && submodule[len - 1] == '/')
|
||||
while (len && is_dir_sep(submodule[len - 1]))
|
||||
len--;
|
||||
|
||||
if (!len)
|
||||
|
|
Загрузка…
Ссылка в новой задаче