refs.c: reindent get_submodule_ref_store()
With the new "if (!submodule) return NULL;" code added in the previous commit, we don't need to check if submodule is not NULL anymore. 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
82a150f27a
commit
873ea90d61
2
refs.c
2
refs.c
@ -1590,13 +1590,11 @@ struct ref_store *get_submodule_ref_store(const char *submodule)
|
|||||||
if (!submodule)
|
if (!submodule)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (submodule) {
|
|
||||||
len = strlen(submodule);
|
len = strlen(submodule);
|
||||||
while (len && is_dir_sep(submodule[len - 1]))
|
while (len && is_dir_sep(submodule[len - 1]))
|
||||||
len--;
|
len--;
|
||||||
if (!len)
|
if (!len)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
if (submodule[len])
|
if (submodule[len])
|
||||||
/* We need to strip off one or more trailing slashes */
|
/* We need to strip off one or more trailing slashes */
|
||||||
|
Loading…
Reference in New Issue
Block a user