aboutsummaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'path.c')
-rw-r--r--path.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/path.c b/path.c
index c597473e6..c105a9e08 100644
--- a/path.c
+++ b/path.c
@@ -240,8 +240,7 @@ static void do_submodule_path(struct strbuf *buf, const char *path,
const char *git_dir;
strbuf_addstr(buf, path);
- if (buf->len && buf->buf[buf->len - 1] != '/')
- strbuf_addch(buf, '/');
+ strbuf_complete(buf, '/');
strbuf_addstr(buf, ".git");
git_dir = read_gitfile(buf->buf);