Skip to content

Commit ee394bd

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent ff9445b commit ee394bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

refs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,7 @@ int resolve_gitlink_ref(const char *submodule, const char *refname,
15071507
struct ref_store *refs;
15081508
int flags;
15091509

1510-
while (len && submodule[len - 1] == '/')
1510+
while (len && is_dir_sep(submodule[len - 1]))
15111511
len--;
15121512

15131513
if (!len)

0 commit comments

Comments
 (0)