From: Sam Vilain <sam.vilain@catalyst.net.nz>
To: git@vger.kernel.org
Cc: Tay Ray Chuan <rctay89@gmail.com>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 082/104] fmt-merge-msg: add function to append shortlog only
Date: Wed, 26 May 2010 18:00:52 +1200 [thread overview]
Message-ID: <1274853674-18521-82-git-send-email-sam.vilain@catalyst.net.nz> (raw)
In-Reply-To: <1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz>
From: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
builtin.h | 1 +
builtin/fmt-merge-msg.c | 13 +++++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/builtin.h b/builtin.h
index 464588b..322901f 100644
--- a/builtin.h
+++ b/builtin.h
@@ -16,6 +16,7 @@ extern const char *help_unknown_cmd(const char *cmd);
extern void prune_packed_objects(int);
extern int fmt_merge_msg(int merge_summary, struct strbuf *in,
struct strbuf *out);
+extern int fmt_merge_msg_shortlog(struct strbuf *in, struct strbuf *out);
extern int commit_tree(const char *msg, unsigned char *tree,
struct commit_list *parents, unsigned char *ret,
const char *author);
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index d0160cb..48548cf 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -255,8 +255,8 @@ static void do_fmt_merge_msg_title(struct strbuf *out,
strbuf_addf(out, " into %s\n", current_branch);
}
-static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,
- struct strbuf *out) {
+static int do_fmt_merge_msg(int merge_title, int merge_summary,
+ struct strbuf *in, struct strbuf *out) {
int limit = 20, i = 0, pos = 0;
unsigned char head_sha1[20];
const char *current_branch;
@@ -285,7 +285,8 @@ static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,
if (!srcs.nr)
return 0;
- do_fmt_merge_msg_title(out, current_branch);
+ if (merge_title)
+ do_fmt_merge_msg_title(out, current_branch);
if (merge_summary) {
struct commit *head;
@@ -305,7 +306,11 @@ static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,
}
int fmt_merge_msg(int merge_summary, struct strbuf *in, struct strbuf *out) {
- return do_fmt_merge_msg(merge_summary, in, out);
+ return do_fmt_merge_msg(1, merge_summary, in, out);
+}
+
+int fmt_merge_msg_shortlog(struct strbuf *in, struct strbuf *out) {
+ return do_fmt_merge_msg(0, 1, in, out);
}
int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)
--
1.7.1.rc2.333.gb2668
next prev parent reply other threads:[~2010-05-26 6:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz>
2010-05-26 6:00 ` [PATCH 075/104] tests: chmod +x t5150 Sam Vilain
2010-05-26 6:00 ` [PATCH 076/104] t7604-merge-custom-message: shift expected output creation Sam Vilain
2010-05-26 6:00 ` Sam Vilain [this message]
2010-05-26 6:00 ` [PATCH 084/104] autocrlf: Make it work also for un-normalized repositories Sam Vilain
2010-05-26 6:00 ` [PATCH 086/104] gitweb: Use @diff_opts while using format-patch Sam Vilain
2010-05-26 6:00 ` [PATCH 087/104] hash_object: correction for zero length file Sam Vilain
2010-05-26 6:00 ` [PATCH 088/104] for-each-ref: Field with abbreviated objectname Sam Vilain
2010-05-26 6:01 ` [PATCH 090/104] Documentation: rebase -i ignores options passed to "git am" Sam Vilain
2010-05-26 6:01 ` [PATCH 091/104] Documentation: fix minor inconsistency Sam Vilain
2010-05-26 6:01 ` [PATCH 092/104] Documentation/gitdiffcore: fix order in pickaxe description Sam Vilain
2010-05-26 6:01 ` [PATCH 093/104] post-receive-email: document command-line mode Sam Vilain
2010-05-26 6:01 ` [PATCH 094/104] diff: fix coloring of extended diff headers Sam Vilain
2010-05-26 6:01 ` [PATCH 095/104] Fix "Out of memory? mmap failed" for files larger than 4GB on Windows Sam Vilain
2010-05-26 6:01 ` [PATCH 096/104] start_command: close cmd->err descriptor when fork/spawn fails Sam Vilain
2010-05-26 6:01 ` [PATCH 097/104] Fix checkout of large files to network shares on Windows XP Sam Vilain
2010-05-26 6:01 ` [PATCH 098/104] mingw: use _commit to implement fsync Sam Vilain
2010-05-26 6:01 ` [PATCH 099/104] Recent MinGW has a C99 implementation of snprintf functions Sam Vilain
2010-05-26 6:01 ` [PATCH 100/104] Complete prototype of git_config_from_parameters() Sam Vilain
2010-05-26 6:01 ` [PATCH 101/104] test get_git_work_tree() return value for NULL Sam Vilain
2010-05-26 6:01 ` [PATCH 102/104] t7502-commit: fix spelling Sam Vilain
2010-05-26 6:01 ` [PATCH 103/104] show-branch: use DEFAULT_ABBREV instead of 7 Sam Vilain
2010-05-26 6:01 ` [PATCH 104/104] Documentation/SubmittingPatches: clarify GMail section and SMTP Sam Vilain
[not found] ` <1274853674-18521-22-git-send-email-sam.vilain@catalyst.net.nz>
2010-05-26 7:46 ` [PATCH 022/104] Gitweb: ignore built file Sverre Rabbelier
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=1274853674-18521-82-git-send-email-sam.vilain@catalyst.net.nz \
--to=sam.vilain@catalyst.net.nz \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=rctay89@gmail.com \
/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).