Skip to content

Commit

Permalink
fmt-merge-msg: minor refactor of fmt_merge_msg()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tay Ray Chuan authored and Junio C Hamano committed May 10, 2010
1 parent 97d45bc commit 2234ec5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion builtin/fmt-merge-msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2234ec5

Please sign in to comment.