diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2017-08-23 19:37:04 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-24 14:59:04 -0700 |
commit | 873ea90d61fa45ec91af3864c2e336bfe489d181 (patch) | |
tree | 05d8e9a793cba1d8c5a9dffda9f59dd174c3e87f | |
parent | 82a150f27a16cd1425d4c78904470e4b7b8c4cf7 (diff) | |
download | git-nd/prune-in-worktree.tar.gz |
refs.c: reindent get_submodule_ref_store()nd/prune-in-worktree
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>
-rw-r--r-- | refs.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -1590,13 +1590,11 @@ struct ref_store *get_submodule_ref_store(const char *submodule) if (!submodule) return NULL; - if (submodule) { - len = strlen(submodule); - while (len && is_dir_sep(submodule[len - 1])) - len--; - if (!len) - return NULL; - } + len = strlen(submodule); + while (len && is_dir_sep(submodule[len - 1])) + len--; + if (!len) + return NULL; if (submodule[len]) /* We need to strip off one or more trailing slashes */ |