summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e931cb)
raw | patch | inline | side by side (parent: 1e931cb)
author | Junio C Hamano <gitster@pobox.com> | |
Sat, 8 Dec 2007 01:19:31 +0000 (17:19 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 8 Dec 2007 19:32:05 +0000 (11:32 -0800) |
This option shows the author's email address next to the name.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-shortlog.c | patch | blob | history |
diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index b9cc134443feb4f9573166faf0745074384e0c21..13df0c668defa3cdf0770bf52fb9d5af399448ee 100644 (file)
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
"git-shortlog [-n] [-s] [<commit-id>... ]";
static char *common_repo_prefix;
+static int email;
static int compare_by_number(const void *a1, const void *a2)
{
len--;
namebuf[len] = '\0';
}
+ else
+ len = strlen(namebuf);
+
+ if (email) {
+ size_t room = sizeof(namebuf) - len - 1;
+ int maillen = eoemail - boemail + 1;
+ snprintf(namebuf + len, room, " %.*s", maillen, boemail);
+ }
buffer = xstrdup(namebuf);
item = path_list_insert(buffer, list);
else if (!strcmp(argv[1], "-s") ||
!strcmp(argv[1], "--summary"))
summary = 1;
+ else if (!strcmp(argv[1], "-e") ||
+ !strcmp(argv[1], "--email"))
+ email = 1;
else if (!prefixcmp(argv[1], "-w")) {
wrap_lines = 1;
parse_wrap_args(argv[1], &in1, &in2, &wrap);