Thread (9 messages) flat view 9 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 5/8] fmt-merge-msg: minor refactor of fmt_merge_msg()

From: Tay Ray Chuan <hidden>
Date: 2016-06-15 22:48:47
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 builtin/fmt-merge-msg.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 379a031..a2bccd6 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;
-- 
1.7.1.189.g07419
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help