git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
f6f8586
)
worktree: initialize return value for submodule_uses_worktrees
author
Stefan Beller
<redacted>
Tue, 27 Dec 2016 17:50:13 +0000
(09:50 -0800)
committer
Junio C Hamano
<redacted>
Tue, 27 Dec 2016 21:59:49 +0000
(13:59 -0800)
When the worktrees directory is empty, the `ret` will be returned
uninitialized. Fix it by initializing the value.
Signed-off-by: Stefan Beller <redacted>
Signed-off-by: Junio C Hamano <redacted>
worktree.c
patch
|
blob
|
history
diff --git
a/worktree.c
b/worktree.c
index d4606aa8cd5ab476599a2f91f9d96ae03389fbab..828fd7a0ad4243749acffb9ef7885e95b8bb2bd0 100644
(file)
--- a/
worktree.c
+++ b/
worktree.c
@@
-387,7
+387,7
@@
int submodule_uses_worktrees(const char *path)
struct strbuf sb = STRBUF_INIT;
DIR *dir;
struct dirent *d;
- int ret;
+ int ret
= 0
;
struct repository_format format;
submodule_gitdir = git_pathdup_submodule(path, "%s", "");
git clone https://git.99rst.org/PROJECT