diff-options doc: grammar fix
[gitweb.git] / setup.c
diff --git a/setup.c b/setup.c
index e3f7699a902aed20a83820067cf913df2f3750a9..2435186e448a6bf09616b0f1de1225ff2a666e48 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -982,6 +982,7 @@ const char *discover_git_directory(struct strbuf *gitdir)
                warning("ignoring git dir '%s': %s",
                        gitdir->buf + gitdir_offset, err.buf);
                strbuf_release(&err);
+               strbuf_setlen(gitdir, gitdir_offset);
                return NULL;
        }