int i;
char *oneline, *reencoded_message = NULL;
const char *message, *encoding;
- const char *defmsg = git_pathdup("MERGE_MSG");
+ char *defmsg = git_pathdup("MERGE_MSG");
git_config(git_default_config, NULL);
me = action == REVERT ? "revert" : "cherry-pick";
* reverse of it if we are revert.
*/
- msg_fd = hold_lock_file_for_update(&msg_file, defmsg, 1);
+ msg_fd = hold_lock_file_for_update(&msg_file, defmsg,
+ LOCK_DIE_ON_ERROR);
encoding = get_encoding(message);
if (!encoding)
return execv_git_cmd(args);
}
free(reencoded_message);
+ free(defmsg);
return 0;
}