worktree: initialize return value for submodule_uses_worktrees
When the worktrees directory is empty, the `ret` will be returned uninitialized. Fix it by initializing the value. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
f6f8586140
commit
7c4be458b1
|
@ -387,7 +387,7 @@ int submodule_uses_worktrees(const char *path)
|
||||||
struct strbuf sb = STRBUF_INIT;
|
struct strbuf sb = STRBUF_INIT;
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct dirent *d;
|
struct dirent *d;
|
||||||
int ret;
|
int ret = 0;
|
||||||
struct repository_format format;
|
struct repository_format format;
|
||||||
|
|
||||||
submodule_gitdir = git_pathdup_submodule(path, "%s", "");
|
submodule_gitdir = git_pathdup_submodule(path, "%s", "");
|
||||||
|
|
Loading…
Reference in New Issue