summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Biesemeyer <ryan@yaauie.com>2014-01-09 00:45:44 +0000
committerJunio C Hamano <gitster@pobox.com>2014-01-10 16:14:50 -0800
commitc5ad9b9c86fc56a1f5e8c6dba1981cdb73cd411b (patch)
tree228cf5a626a4b5163c44d84933364d183f2208b2
parentd3470445d099f615d73f233791483437f9e4379a (diff)
downloadgit-rb/merge-prepare-commit-msg-hook.tar.gz
merge: drop unused arg from abort_commit method signaturerb/merge-prepare-commit-msg-hook
Since abort_commit is no longer responsible for writing merge state, remove the unused argument that was originally needed solely for writing merge state. Signed-off-by: Ryan Biesemeyer <ryan@yaauie.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/merge.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 6420eec502..c11cabc766 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -795,8 +795,7 @@ static void read_merge_msg(struct strbuf *msg)
die_errno(_("Could not read from '%s'"), filename);
}
-static void write_merge_state(struct commit_list *);
-static void abort_commit(struct commit_list *remoteheads, const char *err_msg)
+static void abort_commit(const char *err_msg)
{
if (err_msg)
error("%s", err_msg);
@@ -812,6 +811,7 @@ N_("Please enter a commit message to explain why this merge is necessary,\n"
"Lines starting with '%c' will be ignored, and an empty message aborts\n"
"the commit.\n");
+static void write_merge_state(struct commit_list *);
static void prepare_to_commit(struct commit_list *remoteheads)
{
struct strbuf msg = STRBUF_INIT;
@@ -824,15 +824,15 @@ static void prepare_to_commit(struct commit_list *remoteheads)
write_merge_msg(&msg);
if (run_hook(get_index_file(), "prepare-commit-msg",
git_path("MERGE_MSG"), "merge", NULL, NULL))
- abort_commit(remoteheads, NULL);
+ abort_commit(NULL);
if (0 < option_edit) {
if (launch_editor(git_path("MERGE_MSG"), NULL, NULL))
- abort_commit(remoteheads, NULL);
+ abort_commit(NULL);
}
read_merge_msg(&msg);
stripspace(&msg, 0 < option_edit);
if (!msg.len)
- abort_commit(remoteheads, _("Empty commit message."));
+ abort_commit(_("Empty commit message."));
strbuf_release(&merge_msg);
strbuf_addbuf(&merge_msg, &msg);
strbuf_release(&msg);