Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin-clone.c: no need to strdup for setenv
author
Ali Gholami Rudi
<ali@rudi.ir>
Wed, 1 Apr 2009 11:22:25 +0000
(15:52 +0430)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 1 Apr 2009 15:58:55 +0000
(08:58 -0700)
The setenv function makes a copy, itself.
Signed-off-by: Ali Gholami Rudi <ali@rudi.ir>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-clone.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(from parent 1:
e161acd
)
diff --git
a/builtin-clone.c
b/builtin-clone.c
index 736c72c2360e4cebeafeba350af9d86d8be4c849..880373f279dd073ea7f0ae8564daca1cc687e529 100644
(file)
--- a/
builtin-clone.c
+++ b/
builtin-clone.c
@@
-406,7
+406,7
@@
int cmd_clone(int argc, const char **argv, const char *prefix)
atexit(remove_junk);
sigchain_push_common(remove_junk_on_signal);
- setenv(CONFIG_ENVIRONMENT,
xstrdup(mkpath("%s/config", git_dir)
), 1);
+ setenv(CONFIG_ENVIRONMENT,
mkpath("%s/config", git_dir
), 1);
if (safe_create_leading_directories_const(git_dir) < 0)
die("could not create leading directories of '%s'", git_dir);