Commit 7c4be458 authored by Stefan Beller's avatar Stefan Beller Committed by Junio C Hamano

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's avatarStefan Beller <sbeller@google.com>
Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
parent f6f85861
......@@ -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", "");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment