Merge branch 'ar/maint-mksnpath' into maint
* ar/maint-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 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 rerere.c
This commit is contained in:
@ -269,7 +269,7 @@ static int revert_or_cherry_pick(int argc, const char **argv)
|
||||
int i;
|
||||
char *oneline, *reencoded_message = NULL;
|
||||
const char *message, *encoding;
|
||||
char *defmsg = xstrdup(git_path("MERGE_MSG"));
|
||||
char *defmsg = git_pathdup("MERGE_MSG");
|
||||
|
||||
git_config(git_default_config, NULL);
|
||||
me = action == REVERT ? "revert" : "cherry-pick";
|
||||
|
Reference in New Issue
Block a user