From: Ryan Biesemeyer <ryan@yaauie.com>
To: git@vger.kernel.org
Cc: "Matthieu Moy" <Matthieu.Moy@grenoble-inp.fr>,
"Jonathan Nieder" <jrnieder@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Jeff King" <peff@peff.net>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Ryan Biesemeyer" <ryan@yaauie.com>
Subject: [PATCH v2 4/4] merge: drop unused arg from abort_commit method signature
Date: Thu, 9 Jan 2014 00:45:44 +0000 [thread overview]
Message-ID: <1389228344-38813-5-git-send-email-ryan@yaauie.com> (raw)
In-Reply-To: <1389228344-38813-1-git-send-email-ryan@yaauie.com>
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>
---
builtin/merge.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c
index b7bfc9c..c3108cf 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);
--
1.8.5
prev parent reply other threads:[~2014-01-09 0:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 19:00 [PATCH] merge: make merge state available to prepare-commit-msg hook Ryan Biesemeyer
2014-01-08 19:02 ` Ryan Biesemeyer
2014-01-08 20:06 ` Matthieu Moy
2014-01-08 20:21 ` Ryan Biesemeyer
2014-01-08 20:29 ` Jonathan Nieder
2014-01-08 21:30 ` Matthieu Moy
2014-01-08 22:01 ` Jonathan Nieder
2014-01-09 13:25 ` Matthieu Moy
2014-01-08 19:03 ` Ryan Biesemeyer
2014-01-09 0:45 ` [PATCH v2 0/4] " Ryan Biesemeyer
2014-01-09 0:45 ` [PATCH v2 1/4] t7505: add missing && Ryan Biesemeyer
2014-01-09 0:45 ` [PATCH v2 2/4] t7505: ensure cleanup after hook blocks merge Ryan Biesemeyer
2014-01-09 13:00 ` Matthieu Moy
2014-01-10 23:40 ` Junio C Hamano
2014-01-09 0:45 ` [PATCH v2 3/4] merge: make prepare_to_commit responsible for write_merge_state Ryan Biesemeyer
2014-01-11 0:11 ` Junio C Hamano
2014-01-11 0:20 ` Junio C Hamano
2014-01-09 0:45 ` Ryan Biesemeyer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389228344-38813-5-git-send-email-ryan@yaauie.com \
--to=ryan@yaauie.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).