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 <redacted>
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
struct ref_store *refs;
int flags;
- while (len && submodule[len - 1] == '/')
+ while (len && is_dir_sep(submodule[len - 1]))
len--;
if (!len)