From: Junio C Hamano Date: Wed, 5 Nov 2008 19:35:53 +0000 (-0800) Subject: Merge branch 'ar/mksnpath' X-Git-Tag: v1.6.1-rc1~84 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a1a846a19e854a3b3baff8f55c039846880a2635;p=git.git 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 --- a1a846a19e854a3b3baff8f55c039846880a2635 diff --cc builtin-revert.c index 7483a7a63,7e50c2aa5..4038b4118 --- a/builtin-revert.c +++ b/builtin-revert.c @@@ -251,7 -251,7 +251,7 @@@ static int revert_or_cherry_pick(int ar int i, index_fd, clean; char *oneline, *reencoded_message = NULL; const char *message, *encoding; - char *defmsg = xstrdup(git_path("MERGE_MSG")); - const char *defmsg = git_pathdup("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;