Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
refs.c: reindent get_submodule_ref_store()
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Wed, 23 Aug 2017 12:37:04 +0000
(19:37 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 24 Aug 2017 21:59:04 +0000
(14:59 -0700)
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>
refs.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
82a150f
)
diff --git
a/refs.c
b/refs.c
index a0c5078901294b36856644c5d5d96980b6735df2..206af61d6241c25d29c1a5b5db1a049edf56d62e 100644
(file)
--- a/
refs.c
+++ b/
refs.c
@@
-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 */