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>
This commit is contained in:
parent
97d45bcb2f
commit
2234ec5422
@ -202,7 +202,8 @@ static void shortlog(const char *name, unsigned char *sha1,
|
|||||||
string_list_clear(&subjects, 0);
|
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;
|
int limit = 20, i = 0, pos = 0;
|
||||||
char *sep = "";
|
char *sep = "";
|
||||||
unsigned char head_sha1[20];
|
unsigned char head_sha1[20];
|
||||||
@ -296,6 +297,10 @@ int fmt_merge_msg(int merge_summary, struct strbuf *in, struct strbuf *out) {
|
|||||||
return 0;
|
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)
|
int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)
|
||||||
{
|
{
|
||||||
const char *inpath = NULL;
|
const char *inpath = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user