summaryrefslogtreecommitdiff
path: root/builtin-revert.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-revert.c')
-rw-r--r--builtin-revert.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-revert.c b/builtin-revert.c
index 476f41e..9a3c14c 100644
--- a/builtin-revert.c
+++ b/builtin-revert.c
@@ -274,7 +274,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 = git_pathdup("MERGE_MSG");
+ char *defmsg = NULL;
struct merge_options o;
struct tree *result, *next_tree, *base_tree, *head_tree;
static struct lock_file index_lock;
@@ -364,6 +364,7 @@ static int revert_or_cherry_pick(int argc, const char **argv)
* reverse of it if we are revert.
*/
+ defmsg = git_pathdup("MERGE_MSG");
msg_fd = hold_lock_file_for_update(&msg_file, defmsg,
LOCK_DIE_ON_ERROR);