Skip to content

Commit 873ea90

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent 82a150f commit 873ea90

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

refs.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,13 +1590,11 @@ struct ref_store *get_submodule_ref_store(const char *submodule)
15901590
if (!submodule)
15911591
return NULL;
15921592

1593-
if (submodule) {
1594-
len = strlen(submodule);
1595-
while (len && is_dir_sep(submodule[len - 1]))
1596-
len--;
1597-
if (!len)
1598-
return NULL;
1599-
}
1593+
len = strlen(submodule);
1594+
while (len && is_dir_sep(submodule[len - 1]))
1595+
len--;
1596+
if (!len)
1597+
return NULL;
16001598

16011599
if (submodule[len])
16021600
/* We need to strip off one or more trailing slashes */

0 commit comments

Comments
 (0)