diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/clone.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index e18839d107..ed484cb6f4 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -174,7 +174,8 @@ static char *guess_dir_name(const char *repo, int is_bundle, int is_bare) /* * Strip .{bundle,git}. */ - strip_suffix(start, is_bundle ? ".bundle" : ".git" , &len); + len = end - start; + strip_suffix_mem(start, &len, is_bundle ? ".bundle" : ".git"); if (is_bare) dir = xstrfmt("%.*s.git", (int)len, start); |