{"thread":{"id":"17079","subject":"[PATCH/RFC] shortlog: add option to group together different names/emails of an author","startedAt":"2009-01-10T15:16:29Z","lastAt":"2009-01-19T14:29:56Z","messageCount":5,"participants":["Adeodato Simó","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"99900","messageId":"1231600589-11811-1-git-send-email-dato@net.com.org.es","threadId":"17079","inReplyTo":null,"subject":"[PATCH/RFC] shortlog: add option to group together different names/emails of an author","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2009-01-10T15:16:29Z","receivedAt":"2009-01-10T15:16:29Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"It's common for repositories to contain commits with different spellings of\nan author name, or different email addresses. The shortlog command tries to\nalleviate this by using .mailmap files. However, maintaining a .mailmap file\nup to date is a manual process, and it does not help when shortlog is\ninvoked with the -e option and different email addresses for an author are\ninvolved.\n\nThis commit introduces a -j/--join-uids option that uses a very dumb logic\nto detect different spellings and addresses of a same author. In particular,\nit just joins commits when either the name or the address had been\npreviously seen, attaching the commit to that previous id. In other words,\nthese three ids will be joined:\n\n    Author: Joe Developer <joe@example.com>\n    Author: Joe R. Developer <joe_r@example.com>\n    Author: Joe R. Developer <joe@example.com>\n\nbut only because of the third spelling. The first two alone would be left\nseparate. When the names and addresses are printed, the most common spelling\nand address are used.\n\nIncidentally, there is f817546 in git.git which has this author information:\n\n    Author: Wincent Colaiuta <gitster@pobox.com>\n\nWhich makes all of Wincent's commits to be assigned to Junio with -j. This\nis easily fixed with an entry for gitster@pobox.com in .mailmap, which this\ncommit includes. (And then, only f817546 is be assigned to Junio.)\n\nSigned-off-by: Adeodato Simó <dato@net.com.org.es>\n---\nThis is my scratching of my own itch: I was used to `bzr author-stats`,\nwhich is equivalent to `git shortlog -jsne`. I realize -sn comes close,\nbut I like having the email address listed. Please let me know what you\nthink.\n\nTests and a mention in git-shortlog.txt are missing. That'll come next\nwhen/if I'm told this has a chance of inclusion. :-)\n\nThe code is valgrind'ed. I'm not completely confident, though, bugs will\nnot be hiding in corner cases. Also, I don't see any appreciable\nslowdown with this version in git.git, particularly not between the\ncurrent git-shortlog and this new when run without -j (not when run with\n-j either, but that's less critical).\n\nThis patch applies on top of my as/maint-shortlog-cleanup branch.\n\n .mailmap           |    1 +\n builtin-shortlog.c |  280 +++++++++++++++++++++++++++++++++++++++++++++-------\n shortlog.h         |   14 ++-\n 3 files changed, 256 insertions(+), 39 deletions(-)\n\ndiff --git a/.mailmap b/.mailmap\nindex 373476b..f86d8a7 100644\n--- a/.mailmap\n+++ b/.mailmap\n@@ -27,6 +27,7 @@ Joachim Berdal Haga <cjhaga@fys.uio.no>\n Jon Loeliger <jdl@freescale.com>\n Jon Seymour <jon@blackcubes.dyndns.org>\n Jonathan Nieder <jrnieder@uchicago.edu>\n+Junio C Hamano <gitster@pobox.com>\n Junio C Hamano <junio@twinsun.com>\n Karl Hasselström <kha@treskal.com>\n Kent Engstrom <kent@lysator.liu.se>\ndiff --git a/builtin-shortlog.c b/builtin-shortlog.c\nindex 90e76ae..af155b9 100644\n--- a/builtin-shortlog.c\n+++ b/builtin-shortlog.c\n@@ -9,24 +9,79 @@\n #include \"shortlog.h\"\n #include \"parse-options.h\"\n \n+struct idinfo {\n+\tint count;\n+\tsize_t idx;\n+};\n+\n static char const * const shortlog_usage[] = {\n \t\"git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]\",\n \t\"\",\n \t\"[rev-opts] are documented in git-rev-list(1)\",\n \tNULL\n };\n-\n-static int compare_by_number(const void *a1, const void *a2)\n-{\n-\tconst struct string_list_item *i1 = a1, *i2 = a2;\n-\tconst struct string_list *l1 = i1->util, *l2 = i2->util;\n+\n+static int compare_by_count(const void *a1, const void *a2)\n+{\n+\tconst struct idinfo *i1 = a1, *i2 = a2;\n+\n+\tif (i1->count < i2->count)\n+\t\treturn 1;\n+\telse if (i1->count == i2->count)\n+\t\treturn 0;\n+\telse\n+\t\treturn -1;\n+}\n+\n+static int compare_by_idx_and_count(const void *a1, const void *a2)\n+{\n+\tconst struct string_list_item *it1 = a1, *it2 = a2;\n+\tconst struct idinfo *i1 = it1->util, *i2 = it2->util;\n+\n+\tif (i1->idx < i2->idx)\n+\t\treturn -1;\n+\telse if (i1->idx > i2->idx)\n+\t\treturn 1;\n+\telse if (i1->count < i2->count)\n+\t\treturn 1;\n+\telse if (i1->count > i2->count)\n+\t\treturn -1;\n+\telse\n+\t\treturn 0;\n+}\n+\n+static int compare_by_nr(const void *a1, const void *a2)\n+{\n+\tconst struct string_list *l1 = a1, *l2 = a2;\n \n \tif (l1->nr < l2->nr)\n \t\treturn 1;\n-\telse if (l1->nr == l2->nr)\n+\telse if (l1->nr > l2->nr)\n+\t\treturn -1;\n+\telse if (l1->nr == 0)\n \t\treturn 0;\n \telse\n+\t\treturn strcmp(l1->items[0].util, l2->items[0].util);\n+}\n+\n+static int compare_by_first_util_str(const void *a1, const void *a2)\n+{\n+\tconst struct string_list *l1 = a1, *l2 = a2;\n+\tif (l1->nr && l2->nr)\n+\t\treturn strcmp(l1->items[0].util, l2->items[0].util);\n+\telse if (!l1->nr && !l2->nr)\n+\t\treturn 0;\n+\telse if (l1->nr)\n \t\treturn -1;\n+\telse\n+\t\treturn 1;\n+}\n+\n+static inline void alloc_grow_all_lines(struct shortlog *log)\n+{\n+\tALLOC_GROW(log->all_lines, log->nr + 1, log->alloc);\n+\tmemset(log->all_lines + log->nr,\n+\t       0, (log->alloc - log->nr) * sizeof(struct string_list));\n }\n \n static void insert_one_record(struct shortlog *log,\n@@ -35,9 +90,11 @@ static void insert_one_record(struct shortlog *log,\n {\n \tconst char *dot3 = log->common_repo_prefix;\n \tchar *buffer, *p;\n-\tstruct string_list_item *item;\n+\tstruct string_list_item *item, *name, *email;\n \tchar namebuf[1024];\n-\tsize_t len;\n+\tchar emailbuf[1024];\n+\tstruct idinfo *nu, *eu;\n+\tsize_t len, idx;\n \tconst char *eol;\n \tconst char *boemail, *eoemail;\n \n@@ -61,16 +118,117 @@ static void insert_one_record(struct shortlog *log,\n \telse\n \t\tlen = strlen(namebuf);\n \n-\tif (log->email) {\n-\t\tsize_t room = sizeof(namebuf) - len - 1;\n-\t\tint maillen = eoemail - boemail + 1;\n-\t\tsnprintf(namebuf + len, room, \" %.*s\", maillen, boemail);\n-\t}\n-\n-\titem = string_list_insert(namebuf, &log->list);\n-\tif (item->util == NULL)\n-\t\titem->util = xcalloc(1, sizeof(struct string_list));\n-\n+\t/*\n+\t * log->all_lines is an array of string_lists where each list\n+\t * contains all the records by an author. The author information\n+\t * for all_lines[i] is in the element in log->names that has\n+\t * the \"idx\" member set to i.\n+\t *\n+\t * If join_uids is on, we try to detect different spellings and\n+\t * different email addresses of a same author: when saving a\n+\t * record, we check if we've already seen either the name or the\n+\t * address. If we have, we append to that author (and save the\n+\t * new name/address as alternative spelling). If we have seen\n+\t * both, but they point to different authors, we merge the\n+\t * entries, and always associate the result with the address.\n+\t *\n+\t * To merge in the right order, each record in all_lines[x] has\n+\t * an id (autocounter) in the \"util\" member.\n+\t */\n+\tif (!log->join_uids) {\n+\t\tif (log->email) {\n+\t\t\tsize_t room = sizeof(namebuf) - len - 1;\n+\t\t\tint maillen = eoemail - boemail + 1;\n+\t\t\tsnprintf(namebuf + len, room,\n+\t\t\t\t \" %.*s\", maillen, boemail);\n+\t\t}\n+\t\tname = string_list_insert(namebuf, &log->names);\n+\n+\t\tif (name->util == NULL) {\n+\t\t\talloc_grow_all_lines(log);\n+\t\t\tname->util = nu = xcalloc(1, sizeof(struct idinfo));\n+\t\t\tnu->idx = idx = log->nr++;\n+\t\t\tnu->count = 1;\n+\t\t}\n+\t\telse {\n+\t\t\tnu = name->util;\n+\t\t\tidx = nu->idx;\n+\t\t\tnu->count++;\n+\t\t}\n+\t\tgoto write_line; /* Save one precious level of indentation. */\n+\t}\n+\n+\tint maillen = eoemail - boemail - 1;\n+\tsnprintf(emailbuf, sizeof(emailbuf), \"%.*s\", maillen, boemail+1);\n+\n+\tname = string_list_insert(namebuf, &log->names);\n+\temail = string_list_insert(emailbuf, &log->emails);\n+\n+\tif (name->util == NULL && email->util == NULL) {\n+\t\talloc_grow_all_lines(log);\n+\t\tnu = xcalloc(1, sizeof(struct idinfo));\n+\t\teu = xcalloc(1, sizeof(struct idinfo));\n+\t\tidx = nu->idx = eu->idx = log->nr++;\n+\t}\n+\telse if (name->util == NULL) {\n+\t\tnu = xcalloc(1, sizeof(struct idinfo));\n+\t\teu = email->util;\n+\t\tidx = nu->idx = eu->idx;\n+\t}\n+\telse if (email->util == NULL) {\n+\t\tnu = name->util;\n+\t\teu = xcalloc(1, sizeof(struct idinfo));\n+\t\tidx = eu->idx = nu->idx;\n+\t}\n+\telse {\n+\t\tnu = name->util;\n+\t\teu = email->util;\n+\n+\t\tif (nu->idx != eu->idx) {\n+\t\t\t/* Merge both entries. */\n+\t\t\tint i, j, oldidx;\n+\t\t\tstruct idinfo *info;\n+\t\t\tstruct string_list new = { NULL, 0, 0, 0 };\n+\t\t\tstruct string_list *l1 = &log->all_lines[nu->idx];\n+\t\t\tstruct string_list *l2 = &log->all_lines[eu->idx];\n+\n+\t\t\tfor (i = 0, j = 0; i < l1->nr && j < l2->nr; ) {\n+\t\t\t\tint c1 = (intptr_t) l1->items[i].util;\n+\t\t\t\tint c2 = (intptr_t) l2->items[j].util;\n+\t\t\t\tif (c1 < c2)\n+\t\t\t\t\tstring_list_append(l1->items[i++].string, &new);\n+\t\t\t\telse\n+\t\t\t\t\tstring_list_append(l2->items[j++].string, &new);\n+\t\t\t}\n+\t\t\twhile (i < l1->nr) {\n+\t\t\t\tstring_list_append(l1->items[i++].string, &new);\n+\t\t\t}\n+\t\t\twhile (j < l2->nr) {\n+\t\t\t\tstring_list_append(l2->items[j++].string, &new);\n+\t\t\t}\n+\n+\t\t\toldidx = nu->idx; /* Always favour the email. */\n+\n+\t\t\tfor (i = 0; i < log->names.nr; i++)\n+\t\t\t\tif ((info = log->names.items[i].util)->idx == oldidx)\n+\t\t\t\t\tinfo->idx = eu->idx;\n+\n+\t\t\tfor (i = 0; i < log->emails.nr; i++)\n+\t\t\t\tif ((info = log->emails.items[i].util)->idx == oldidx)\n+\t\t\t\t\tinfo->idx = eu->idx;\n+\n+\t\t\tstring_list_clear(l1, 0);\n+\t\t\tstring_list_clear(l2, 0);\n+\t\t\tmemcpy(l2, &new, sizeof(struct string_list));\n+\t\t}\n+\t\tidx = nu->idx;\n+\t}\n+\tnu->count++;\n+\teu->count++;\n+\tname->util = nu;\n+\temail->util = eu;\n+\n+write_line:\n \t/* Skip any leading whitespace, including any blank lines. */\n \twhile (*oneline && isspace(*oneline))\n \t\toneline++;\n@@ -100,7 +258,8 @@ static void insert_one_record(struct shortlog *log,\n \t\t}\n \t}\n \n-\tstring_list_append(buffer, item->util);\n+\titem = string_list_append(buffer, &log->all_lines[idx]);\n+\titem->util = (void*)(intptr_t) log->commit_count++;\n }\n \n static void read_from_stdin(struct shortlog *log)\n@@ -218,10 +377,12 @@ void shortlog_init(struct shortlog *log)\n \n \tread_mailmap(&log->mailmap, \".mailmap\", &log->common_repo_prefix);\n \n-\tlog->list.strdup_strings = 1;\n \tlog->wrap = DEFAULT_WRAPLEN;\n \tlog->in1 = DEFAULT_INDENT1;\n \tlog->in2 = DEFAULT_INDENT2;\n+\n+\tlog->names.strdup_strings = 1;\n+\tlog->emails.strdup_strings = 1;\n }\n \n int cmd_shortlog(int argc, const char **argv, const char *prefix)\n@@ -237,6 +398,8 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix)\n \t\t\t    \"Suppress commit descriptions, only provides commit count\"),\n \t\tOPT_BOOLEAN('e', \"email\", &log.email,\n \t\t\t    \"Show the email address of each author\"),\n+\t\tOPT_BOOLEAN('j', \"join-uids\", &log.join_uids,\n+\t\t\t    \"Group together different spellings and addresses of an author\"),\n \t\t{ OPTION_CALLBACK, 'w', NULL, &log, \"w[,i1[,i2]]\",\n \t\t\t\"Linewrap output\", PARSE_OPT_OPTARG, &parse_wrap_args },\n \t\tOPT_END(),\n@@ -285,16 +448,65 @@ parse_done:\n void shortlog_output(struct shortlog *log)\n {\n \tint i, j;\n-\tif (log->sort_by_number)\n-\t\tqsort(log->list.items, log->list.nr, sizeof(struct string_list_item),\n-\t\t\tcompare_by_number);\n-\tfor (i = 0; i < log->list.nr; i++) {\n-\t\tstruct string_list *onelines = log->list.items[i].util;\n-\n+\n+\t/*\n+\t * We do some pre-processing to find the author name for each item\n+\t * in log->all_lines, saving it in all_lines[i].util. If join_uids\n+\t * is on, the most common spelling and address will be used.\n+\t */\n+\tqsort(log->names.items, log->names.nr,\n+\t      sizeof(struct string_list_item), compare_by_idx_and_count);\n+\n+\tif (log->join_uids && log->email)\n+\t\tqsort(log->emails.items, log->emails.nr,\n+\t\t      sizeof(struct string_list_item), compare_by_idx_and_count);\n+\n+\tfor (i = 0, j = 0; ; i++) {\n+\t\tstatic int idx = -1;\n+\t\tstatic const struct idinfo *info = NULL;\n+\t\twhile (i < log->names.nr &&\n+\t\t       (info = log->names.items[i].util)->idx == idx)\n+\t\t\ti++;\n+\t\tif (!info || info->idx == idx)\n+\t\t\tbreak;\n+\t\tidx = info->idx;\n+\t\tif (log->join_uids && log->email) {\n+\t\t\tint len;\n+\t\t\tchar *name, *email, *newname;\n+\t\t\twhile (j < log->emails.nr &&\n+\t\t\t       (info = log->emails.items[j].util)->idx != idx)\n+\t\t\t\tj++;\n+\t\t\tif (j == log->emails.nr)\n+\t\t\t\tdie(\"Could not find email address for '%s'\",\n+\t\t\t\t    log->names.items[i].string);\n+\t\t\tname = log->names.items[i].string;\n+\t\t\temail = log->emails.items[j].string;\n+\t\t\tlen = strlen(name) + strlen(email) + 4;\n+\t\t\tnewname = xmalloc(len);\n+\t\t\tsnprintf(newname, len, \"%s <%s>\", name, email);\n+\t\t\tfree(name);\n+\t\t\tlog->names.items[i].string = newname;\n+\t\t}\n+\t\tlog->all_lines[idx].items[0].util = log->names.items[i].string;\n+\t}\n+\n+\tqsort(log->all_lines, log->nr, sizeof(struct string_list),\n+\t      log->sort_by_number ? compare_by_nr : compare_by_first_util_str);\n+\n+\tfor (i = 0; i < log->nr; i++) {\n+\t\tconst char *name;\n+\t\tstruct string_list *onelines = &log->all_lines[i];\n+\n+\t\tif (onelines->nr == 0)\n+\t\t\t/* There can be empty lists for merged names. */\n+\t\t\tcontinue;\n+\t\telse\n+\t\t\tname = onelines->items[0].util;\n+\n \t\tif (log->summary) {\n-\t\t\tprintf(\"%6d\\t%s\\n\", onelines->nr, log->list.items[i].string);\n+\t\t\tprintf(\"%6d\\t%s\\n\", onelines->nr, name);\n \t\t} else {\n-\t\t\tprintf(\"%s (%d):\\n\", log->list.items[i].string, onelines->nr);\n+\t\t\tprintf(\"%s (%d):\\n\", name, onelines->nr);\n \t\t\tfor (j = onelines->nr - 1; j >= 0; j--) {\n \t\t\t\tconst char *msg = onelines->items[j].string;\n \n@@ -308,15 +520,13 @@ void shortlog_output(struct shortlog *log)\n \t\t\t}\n \t\t\tputchar('\\n');\n \t\t}\n-\n \t\tonelines->strdup_strings = 1;\n \t\tstring_list_clear(onelines, 0);\n-\t\tfree(onelines);\n-\t\tlog->list.items[i].util = NULL;\n-\t}\n-\n-\tlog->list.strdup_strings = 1;\n-\tstring_list_clear(&log->list, 1);\n+\t}\n+\n+\tfree(log->all_lines);\n+\tstring_list_clear(&log->names, 1);\n+\tstring_list_clear(&log->emails, 1);\n \tlog->mailmap.strdup_strings = 1;\n \tstring_list_clear(&log->mailmap, 1);\n }\ndiff --git a/shortlog.h b/shortlog.h\nindex bc02cc2..f539bf0 100644\n--- a/shortlog.h\n+++ b/shortlog.h\n@@ -4,18 +4,24 @@\n #include \"string-list.h\"\n \n struct shortlog {\n-\tstruct string_list list;\n \tint summary;\n \tint wrap_lines;\n \tint sort_by_number;\n \tint wrap;\n \tint in1;\n \tint in2;\n-\tint user_format;\n-\n+\tint email;\n+\tint join_uids;\n+\n+\tint user_format;\n \tchar *common_repo_prefix;\n-\tint email;\n \tstruct string_list mailmap;\n+\n+\tint nr, alloc;\n+\tint commit_count;\n+\tstruct string_list names;\n+\tstruct string_list emails;\n+\tstruct string_list *all_lines;\n };\n \n void shortlog_init(struct shortlog *log);\n-- \n1.6.1.134.g55c35\n"},{"id":"101135","messageId":"20090119134346.GA27509@chistera.yi.org","threadId":"17079","inReplyTo":"1231600589-11811-1-git-send-email-dato@net.com.org.es","subject":"Re: [PATCH/RFC] shortlog: add option to group together different names/emails of an author","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2009-01-19T13:43:46Z","receivedAt":"2009-01-19T13:43:46Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"Ping? I realize this may be seen as a big patch dropped out of the blue,\nbut I would very much like to hear some comments on at least the feature\nitself, which should not take more than reading the commit message.\n(Hints as to what to do to get people to comment on the code also\nwelcome, of course.)\n\n--- Adeodato Simó [Sat, 10 Jan 2009 16:16:29 +0100]:\n\n> It's common for repositories to contain commits with different spellings of\n> an author name, or different email addresses. The shortlog command tries to\n> alleviate this by using .mailmap files. However, maintaining a .mailmap file\n> up to date is a manual process, and it does not help when shortlog is\n> invoked with the -e option and different email addresses for an author are\n> involved.\n\n> This commit introduces a -j/--join-uids option that uses a very dumb logic\n> to detect different spellings and addresses of a same author. In particular,\n> it just joins commits when either the name or the address had been\n> previously seen, attaching the commit to that previous id. In other words,\n> these three ids will be joined:\n\n>     Author: Joe Developer <joe@example.com>\n>     Author: Joe R. Developer <joe_r@example.com>\n>     Author: Joe R. Developer <joe@example.com>\n\n> but only because of the third spelling. The first two alone would be left\n> separate. When the names and addresses are printed, the most common spelling\n> and address are used.\n\n> Incidentally, there is f817546 in git.git which has this author information:\n\n>     Author: Wincent Colaiuta <gitster@pobox.com>\n\n> Which makes all of Wincent's commits to be assigned to Junio with -j. This\n> is easily fixed with an entry for gitster@pobox.com in .mailmap, which this\n> commit includes. (And then, only f817546 is be assigned to Junio.)\n\n> Signed-off-by: Adeodato Simó <dato@net.com.org.es>\n> ---\n> This is my scratching of my own itch: I was used to `bzr author-stats`,\n> which is equivalent to `git shortlog -jsne`. I realize -sn comes close,\n> but I like having the email address listed. Please let me know what you\n> think.\n\n> Tests and a mention in git-shortlog.txt are missing. That'll come next\n> when/if I'm told this has a chance of inclusion. :-)\n\n> The code is valgrind'ed. I'm not completely confident, though, bugs will\n> not be hiding in corner cases. Also, I don't see any appreciable\n> slowdown with this version in git.git, particularly not between the\n> current git-shortlog and this new when run without -j (not when run with\n> -j either, but that's less critical).\n\n> This patch applies on top of my as/maint-shortlog-cleanup branch.\n\n>  .mailmap           |    1 +\n>  builtin-shortlog.c |  280 +++++++++++++++++++++++++++++++++++++++++++++-------\n>  shortlog.h         |   14 ++-\n>  3 files changed, 256 insertions(+), 39 deletions(-)\n\n-- \nAdeodato Simó                                     dato at net.com.org.es\nDebian Developer                                  adeodato at debian.org\n \nDon't be irreplaceable, if you can't be replaced, you can't be promoted.\n"},{"id":"101136","messageId":"alpine.DEB.1.00.0901191445340.3586@pacific.mpi-cbg.de","threadId":"17079","inReplyTo":"20090119134346.GA27509@chistera.yi.org","subject":"Re: [PATCH/RFC] shortlog: add option to group together different names/emails of an author","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-19T13:49:39Z","receivedAt":"2009-01-19T13:49:39Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 19 Jan 2009, Adeodato Simó wrote:\n\n> Ping? I realize this may be seen as a big patch dropped out of the blue,\n> but I would very much like to hear some comments on at least the feature\n> itself, which should not take more than reading the commit message.\n\nThis is such a huge change, for something that not many people want.  \nActually, you seem to be the first.\n\nAnd you could just as well write a script that takes the output of\n\n\t$ git log --pretty=format:%an\\ %ae --all | sort | uniq\n\nand constructs a valid .mailmap.  That would also have the advantage that \nyou do not need to perform the analysis each time you call Git.\n\nAll these reasons make me believe that your patch should not be applied.\n\nSorry,\nDscho\n"},{"id":"101137","messageId":"20090119141107.GA27992@chistera.yi.org","threadId":"17079","inReplyTo":"alpine.DEB.1.00.0901191445340.3586@pacific.mpi-cbg.de","subject":"Re: [PATCH/RFC] shortlog: add option to group together different names/emails of an author","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2009-01-19T14:11:07Z","receivedAt":"2009-01-19T14:11:07Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"* Johannes Schindelin [Mon, 19 Jan 2009 14:49:39 +0100]:\n\n> > Ping? I realize this may be seen as a big patch dropped out of the blue,\n> > but I would very much like to hear some comments on at least the feature\n> > itself, which should not take more than reading the commit message.\n\n> This is such a huge change, for something that not many people want.  \n> Actually, you seem to be the first.\n\nThat's, uhm, sad. (I don't really buy the \"not many people want it,\nhence we should not include it\" argument, unless by people you mean\n\"people who could do a review\". No hard feelings, though.)\n\n> And you could just as well write a script that takes the output of\n\n> \t$ git log --pretty=format:%an\\ %ae --all | sort | uniq\n\n> and constructs a valid .mailmap.  That would also have the advantage that \n> you do not need to perform the analysis each time you call Git.\n\nNo, not really. As mentioned in the commit message, .mailmap files don't\nhelp when you invoke shortlog with -e, and different email addresses for\nan author are involved.\n\n> All these reasons make me believe that your patch should not be applied.\n\nOkay, I'll let go.\n\nCheers,\n\n-- \nAdeodato Simó                                     dato at net.com.org.es\nDebian Developer                                  adeodato at debian.org\n \nMankind are very odd creatures: one half censure what they practice, the\nother half practice what they censure; the rest always say and do as\nthey ought.\n                -- Michel de Montaigne\n"},{"id":"101138","messageId":"alpine.DEB.1.00.0901191528280.3586@pacific.mpi-cbg.de","threadId":"17079","inReplyTo":"20090119141107.GA27992@chistera.yi.org","subject":"Re: [PATCH/RFC] shortlog: add option to group together different names/emails of an author","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-19T14:29:56Z","receivedAt":"2009-01-19T14:29:56Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 19 Jan 2009, Adeodato Simó wrote:\n\n> * Johannes Schindelin [Mon, 19 Jan 2009 14:49:39 +0100]:\n> \n> > > Ping? I realize this may be seen as a big patch dropped out of the blue,\n> > > but I would very much like to hear some comments on at least the feature\n> > > itself, which should not take more than reading the commit message.\n> \n> > And you could just as well write a script that takes the output of\n> \n> > \t$ git log --pretty=format:%an\\ %ae --all | sort | uniq\n> \n> > and constructs a valid .mailmap.  That would also have the advantage that \n> > you do not need to perform the analysis each time you call Git.\n> \n> No, not really. As mentioned in the commit message, .mailmap files don't \n> help when you invoke shortlog with -e, and different email addresses for \n> an author are involved.\n\nWell, the whole point of -e is that you want to see the email addresses, \ntoo.  So I am not really convinced it would be a good idea to mangle them.\n\nBut hey, I only expressed a personal opinion; If you can convince others, \nyou still might bring that feature in.  You'll have to convince them, \nthough.\n\nCiao,\nDscho\n"}]}