summaryrefslogtreecommitdiff
path: root/builtin-revert.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-11-05 11:35:53 -0800
committerJunio C Hamano <gitster@pobox.com>2008-11-05 11:35:53 -0800
commita1a846a19e854a3b3baff8f55c039846880a2635 (patch)
tree0d6aebb3626cbc4204a1ec455e3b2105b4733062 /builtin-revert.c
parentd95f91d9e48a88a39ac2de5bfddd9d33fd36435d (diff)
parent98b35e2c749614446b916230148d66857e8a09f3 (diff)
downloadgit-a1a846a19e854a3b3baff8f55c039846880a2635.tar.gz
Merge branch 'ar/mksnpath'
* ar/mksnpath: Use git_pathdup instead of xstrdup(git_path(...)) git_pathdup: returns xstrdup-ed copy of the formatted path Fix potentially dangerous use of git_path in ref.c Add git_snpath: a .git path formatting routine with output buffer Fix potentially dangerous uses of mkpath and git_path Fix potentially dangerous uses of mkpath and git_path Fix mkpath abuse in dwim_ref and dwim_log of sha1_name.c Add mksnpath which allows you to specify the output buffer Conflicts: builtin-revert.c
Diffstat (limited to 'builtin-revert.c')
-rw-r--r--builtin-revert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-revert.c b/builtin-revert.c
index 7483a7a63b..4038b4118d 100644
--- a/builtin-revert.c
+++ b/builtin-revert.c
@@ -251,7 +251,7 @@ static int revert_or_cherry_pick(int argc, const char **argv)
int i, index_fd, clean;
char *oneline, *reencoded_message = NULL;
const char *message, *encoding;
- char *defmsg = xstrdup(git_path("MERGE_MSG"));
+ char *defmsg = git_pathdup("MERGE_MSG");
struct merge_options o;
struct tree *result, *next_tree, *base_tree, *head_tree;
static struct lock_file index_lock;