Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2010-05-10 21:17:49 +0400
committerJunio C Hamano <gitster@pobox.com>2010-05-10 22:57:33 +0400
commit2234ec5422201cd58f51b82fb4af146cf896767d (patch)
tree4cfa78efbab54078c2dd7f30f3027c94b5bcb1a0 /builtin/fmt-merge-msg.c
parent97d45bcb2f6bdd9cb164d151a6e064ffdcd5e2bc (diff)
fmt-merge-msg: minor refactor of fmt_merge_msg()
Shift implementation into a private function, do_fmt_merge_msg(). This allows for further changes to the implementation, without affecting the interface. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fmt-merge-msg.c')
-rw-r--r--builtin/fmt-merge-msg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 379a03131f..a2bccd6ea4 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -202,7 +202,8 @@ static void shortlog(const char *name, unsigned char *sha1,
string_list_clear(&subjects, 0);
}
-int fmt_merge_msg(int merge_summary, struct strbuf *in, struct strbuf *out) {
+static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,
+ struct strbuf *out) {
int limit = 20, i = 0, pos = 0;
char *sep = "";
unsigned char head_sha1[20];
@@ -296,6 +297,10 @@ int fmt_merge_msg(int merge_summary, struct strbuf *in, struct strbuf *out) {
return 0;
}
+int fmt_merge_msg(int merge_summary, struct strbuf *in, struct strbuf *out) {
+ return do_fmt_merge_msg(merge_summary, in, out);
+}
+
int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)
{
const char *inpath = NULL;