Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'nd/stop-setenv-work-tree' into nd/clear-gitenv-upon-use-of-alias
[gitweb.git]
/
builtin
/
clone.c
diff --git
a/builtin/clone.c
b/builtin/clone.c
index a72ff7e0098da9c89f6000e724ea097e3403601f..53cf545c5ec20a97e8380979d304acad7ec0e965 100644
(file)
--- 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);