diff options
author | Stefan Beller <sbeller@google.com> | 2016-12-27 17:50:13 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-27 21:59:49 (GMT) |
commit | 7c4be458b1c7ba81b0cc63d76a144261eb2395be (patch) | |
tree | 12df99aec998f2f7eb2ba2a38e1c9099e14d4bf9 /worktree.c | |
parent | f6f858614003a3da794385cefdbddf00b85f7501 (diff) | |
download | git-7c4be458b1c7ba81b0cc63d76a144261eb2395be.zip git-7c4be458b1c7ba81b0cc63d76a144261eb2395be.tar.gz git-7c4be458b1c7ba81b0cc63d76a144261eb2395be.tar.bz2 |
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>
Diffstat (limited to 'worktree.c')
-rw-r--r-- | worktree.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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", ""); |