{"thread":{"id":"4750","subject":"[PATCH 2nd try] Make git-fmt-merge-msg a builtin","startedAt":"2006-07-03T15:18:43Z","lastAt":"2006-07-04T08:18:58Z","messageCount":5,"participants":["Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"23112","messageId":"Pine.LNX.4.63.0607031717540.29667@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4750","inReplyTo":null,"subject":"[PATCH 2nd try] Make git-fmt-merge-msg a builtin","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-07-03T15:18:43Z","receivedAt":"2006-07-03T15:18:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n\n---\n\tThis retires git-fmt-merge-msg.perl, since it passes all the\n\ttests, but removes the Perl version not now. Did I mention it\n\tis very, very, very fast? (Even compared to the Git.pm version;\n\tmeasured on a cygwin setup.)\n\n Makefile                |    7 +\n builtin-fmt-merge-msg.c |  355 +++++++++++++++++++++++++++++++++++++++++++++++\n builtin.h               |    1 \n git.c                   |    3 \n 4 files changed, 362 insertions(+), 4 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex c142bdd..a551c33 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -147,7 +147,7 @@ SCRIPT_SH = \\\n \n SCRIPT_PERL = \\\n \tgit-archimport.perl git-cvsimport.perl git-relink.perl \\\n-\tgit-shortlog.perl git-fmt-merge-msg.perl git-rerere.perl \\\n+\tgit-shortlog.perl git-rerere.perl \\\n \tgit-annotate.perl git-cvsserver.perl \\\n \tgit-svnimport.perl git-mv.perl git-cvsexportcommit.perl \\\n \tgit-send-email.perl\n@@ -189,7 +189,8 @@ BUILT_INS = git-log$X git-whatchanged$X \n \tgit-ls-files$X git-ls-tree$X git-get-tar-commit-id$X \\\n \tgit-read-tree$X git-commit-tree$X git-write-tree$X \\\n \tgit-apply$X git-show-branch$X git-diff-files$X git-update-index$X \\\n-\tgit-diff-index$X git-diff-stages$X git-diff-tree$X git-cat-file$X\n+\tgit-diff-index$X git-diff-stages$X git-diff-tree$X git-cat-file$X \\\n+\tgit-fmt-merge-msg$X\n \n # what 'all' will build and 'install' will install, in gitexecdir\n ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)\n@@ -245,7 +246,7 @@ BUILTIN_OBJS = \\\n \tbuiltin-apply.o builtin-show-branch.o builtin-diff-files.o \\\n \tbuiltin-diff-index.o builtin-diff-stages.o builtin-diff-tree.o \\\n \tbuiltin-cat-file.o builtin-mailsplit.o builtin-stripspace.o \\\n-\tbuiltin-update-ref.o\n+\tbuiltin-update-ref.o builtin-fmt-merge-msg.o\n \n GITLIBS = $(LIB_FILE) $(XDIFF_LIB)\n EXTLIBS = -lz\ndiff --git a/builtin-fmt-merge-msg.c b/builtin-fmt-merge-msg.c\nnew file mode 100644\nindex 0000000..6527482\n--- /dev/null\n+++ b/builtin-fmt-merge-msg.c\n@@ -0,0 +1,355 @@\n+#include \"cache.h\"\n+#include \"commit.h\"\n+#include \"diff.h\"\n+#include \"revision.h\"\n+#include \"tag.h\"\n+\n+static const char *fmt_merge_msg_usage =\n+\t\"git-fmt-merge-msg [--summary] [--no-summary] [--file <file>]\";\n+\n+static int merge_summary = 0;\n+\n+static int fmt_merge_msg_config(const char *key, const char *value)\n+{\n+\tif (!strcmp(\"merge.summary\", key))\n+\t\tmerge_summary = git_config_bool(key, value);\n+\treturn 0;\n+}\n+\n+struct list {\n+\tchar **list;\n+\tvoid **payload;\n+\tunsigned nr, alloc;\n+};\n+\n+static void append_to_list(struct list *list, char *value, void *payload)\n+{\n+\tif (list->nr == list->alloc) {\n+\t\tlist->alloc += 32;\n+\t\tlist->list = realloc(list->list, sizeof(char *) * list->alloc);\n+\t\tlist->payload = realloc(list->payload,\n+\t\t\t\tsizeof(char *) * list->alloc);\n+\t}\n+\tlist->payload[list->nr] = payload;\n+\tlist->list[list->nr++] = value;\n+}\n+\n+static int find_in_list(struct list *list, char *value)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < list->nr; i++)\n+\t\tif (!strcmp(list->list[i], value))\n+\t\t\treturn i;\n+\n+\treturn -1;\n+}\n+\n+static void free_list(struct list *list)\n+{\n+\tint i;\n+\n+\tif (list->alloc == 0)\n+\t\treturn;\n+\n+\tfor (i = 0; i < list->nr; i++) {\n+\t\tfree(list->list[i]);\n+\t\tif (list->payload[i])\n+\t\t\tfree(list->payload[i]);\n+\t}\n+\tfree(list->list);\n+\tfree(list->payload);\n+\tlist->nr = list->alloc = 0;\n+}\n+\n+struct src_data {\n+\tstruct list branch, tag, r_branch, generic;\n+\tint head_status;\n+};\n+\n+static struct list srcs = { NULL, NULL, 0, 0};\n+static struct list origins = { NULL, NULL, 0, 0};\n+\n+static int handle_line(char *line)\n+{\n+\tint i, len = strlen(line);\n+\tunsigned char *sha1;\n+\tchar *src, *origin;\n+\tstruct src_data *src_data;\n+\n+\tif (len < 43 || line[40] != '\\t')\n+\t\treturn 1;\n+\n+\tif (!strncmp(line + 41, \"not-for-merge\", 13))\n+\t\treturn 0;\n+\n+\tif (line[41] != '\\t')\n+\t\treturn 2;\n+\n+\tline[40] = 0;\n+\tsha1 = xmalloc(20);\n+\ti = get_sha1(line, sha1);\n+\tline[40] = '\\t';\n+\tif (i)\n+\t\treturn 3;\n+\n+\tif (line[len - 1] == '\\n')\n+\t\tline[len - 1] = 0;\n+\tline += 42;\n+\n+\tsrc = strstr(line, \" of \");\n+\tif (src) {\n+\t\t*src = 0;\n+\t\tsrc += 4;\n+\t} else\n+\t\tsrc = \"HEAD\";\n+\n+\ti = find_in_list(&srcs, src);\n+\tif (i < 0) {\n+\t\ti = srcs.nr;\n+\t\tappend_to_list(&srcs, strdup(src),\n+\t\t\t\txcalloc(1, sizeof(struct src_data)));\n+\t}\n+\tsrc_data = srcs.payload[i];\n+\n+\tif (!strncmp(line, \"branch \", 7)) {\n+\t\torigin = strdup(line + 7);\n+\t\tappend_to_list(&src_data->branch, origin, NULL);\n+\t\tsrc_data->head_status |= 2;\n+\t} else if (!strncmp(line, \"tag \", 4)) {\n+\t\torigin = line;\n+\t\tappend_to_list(&src_data->tag, strdup(origin + 4), NULL);\n+\t\tsrc_data->head_status |= 2;\n+\t} else if (!strncmp(line, \"remote branch \", 14)) {\n+\t\torigin = strdup(line + 14);\n+\t\tappend_to_list(&src_data->r_branch, origin, NULL);\n+\t\tsrc_data->head_status |= 2;\n+\t} else if (!strcmp(line, \"HEAD\")) {\n+\t\torigin = strdup(src);\n+\t\tsrc_data->head_status |= 1;\n+\t} else {\n+\t\torigin = strdup(src);\n+\t\tappend_to_list(&src_data->generic, strdup(line), NULL);\n+\t\tsrc_data->head_status |= 2;\n+\t}\n+\n+\tif (!strcmp(\".\", src) || !strcmp(src, origin)) {\n+\t\tint len = strlen(origin);\n+\t\tif (origin[0] == '\\'' && origin[len - 1] == '\\'') {\n+\t\t\tchar *new_origin = malloc(len - 1);\n+\t\t\tmemcpy(new_origin, origin + 1, len - 2);\n+\t\t\tnew_origin[len - 1] = 0;\n+\t\t\torigin = new_origin;\n+\t\t} else\n+\t\t\torigin = strdup(origin);\n+\t} else {\n+\t\tchar *new_origin = malloc(strlen(origin) + strlen(src) + 5);\n+\t\tsprintf(new_origin, \"%s of %s\", origin, src);\n+\t\torigin = new_origin;\n+\t}\n+\tappend_to_list(&origins, origin, sha1);\n+\treturn 0;\n+}\n+\n+static void print_joined(const char *singular, const char *plural,\n+\t\tstruct list *list)\n+{\n+\tif (list->nr == 0)\n+\t\treturn;\n+\tif (list->nr == 1) {\n+\t\tprintf(\"%s%s\", singular, list->list[0]);\n+\t} else {\n+\t\tint i;\n+\t\tprintf(\"%s\", plural);\n+\t\tfor (i = 0; i < list->nr - 1; i++)\n+\t\t\tprintf(\"%s%s\", i > 0 ? \", \" : \"\", list->list[i]);\n+\t\tprintf(\" and %s\", list->list[list->nr - 1]);\n+\t}\n+}\n+\n+static void shortlog(const char *name, unsigned char *sha1,\n+\t\tstruct commit *head, struct rev_info *rev, int limit)\n+{\n+\tint i, count = 0;\n+\tstruct commit *commit;\n+\tstruct object *branch;\n+\tstruct list subjects = { NULL, NULL, 0, 0 };\n+\tint flags = UNINTERESTING | TREECHANGE | SEEN | SHOWN | ADDED;\n+\n+\tbranch = deref_tag(parse_object(sha1), sha1_to_hex(sha1), 40);\n+\tif (!branch || branch->type != TYPE_COMMIT)\n+\t\treturn;\n+\n+\tsetup_revisions(0, NULL, rev, NULL);\n+\trev->ignore_merges = 1;\n+\tadd_pending_object(rev, branch, name);\n+\tadd_pending_object(rev, &head->object, \"^HEAD\");\n+\thead->object.flags |= UNINTERESTING;\n+\tprepare_revision_walk(rev);\n+\twhile ((commit = get_revision(rev)) != NULL) {\n+\t\tchar *oneline, *bol, *eol;\n+\n+\t\t/* ignore merges */\n+\t\tif (commit->parents && commit->parents->next)\n+\t\t\tcontinue;\n+\n+\t\tcount++;\n+\t\tif (subjects.nr > limit)\n+\t\t\tcontinue;\n+\n+\t\tbol = strstr(commit->buffer, \"\\n\\n\");\n+\t\tif (!bol) {\n+\t\t\tappend_to_list(&subjects, strdup(sha1_to_hex(\n+\t\t\t\t\t\t\tcommit->object.sha1)),\n+\t\t\t\t\tNULL);\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tbol += 2;\n+\t\teol = strchr(bol, '\\n');\n+\n+\t\tif (eol) {\n+\t\t\tint len = eol - bol;\n+\t\t\toneline = malloc(len + 1);\n+\t\t\tmemcpy(oneline, bol, len);\n+\t\t\toneline[len] = 0;\n+\t\t} else\n+\t\t\toneline = strdup(bol);\n+\t\tappend_to_list(&subjects, oneline, NULL);\n+\t}\n+\n+\tif (count > limit)\n+\t\tprintf(\"\\n* %s: (%d commits)\\n\", name, count);\n+\telse\n+\t\tprintf(\"\\n* %s:\\n\", name);\n+\n+\tfor (i = 0; i < subjects.nr; i++)\n+\t\tif (i >= limit)\n+\t\t\tprintf(\"  ...\\n\");\n+\t\telse\n+\t\t\tprintf(\"  %s\\n\", subjects.list[i]);\n+\n+\tclear_commit_marks((struct commit *)branch, flags);\n+\tclear_commit_marks(head, flags);\n+\tfree_commit_list(rev->commits);\n+\trev->commits = NULL;\n+\trev->pending.nr = 0;\n+\n+\tfree_list(&subjects);\n+}\n+\n+int cmd_fmt_merge_msg(int argc, char **argv, char **envp)\n+{\n+\tint limit = 20, i = 0;\n+\tchar line[1024];\n+\tFILE *in = stdin;\n+\tconst char *sep = \"\";\n+\tunsigned char head_sha1[20];\n+\tconst char *head, *current_branch;\n+\n+\tgit_config(fmt_merge_msg_config);\n+\n+\twhile (argc > 1) {\n+\t\tif (!strcmp(argv[1], \"--summary\"))\n+\t\t\tmerge_summary = 1;\n+\t\telse if (!strcmp(argv[1], \"--no-summary\"))\n+\t\t\tmerge_summary = 0;\n+\t\telse if (!strcmp(argv[1], \"-F\") || !strcmp(argv[1], \"--file\")) {\n+\t\t\tif (argc < 2)\n+\t\t\t\tdie (\"Which file?\");\n+\t\t\tif (!strcmp(argv[2], \"-\"))\n+\t\t\t\tin = stdin;\n+\t\t\telse {\n+\t\t\t\tfclose(in);\n+\t\t\t\tin = fopen(argv[2], \"r\");\n+\t\t\t}\n+\t\t\targc--; argv++;\n+\t\t} else\n+\t\t\tbreak;\n+\t\targc--; argv++;\n+\t}\n+\n+\tif (argc > 1)\n+\t\tusage(fmt_merge_msg_usage);\n+\n+\t/* get current branch */\n+\thead = strdup(git_path(\"HEAD\"));\n+\tcurrent_branch = resolve_ref(head, head_sha1, 1);\n+\tcurrent_branch += strlen(head) - 4;\n+\tfree((char *)head);\n+\tif (!strncmp(current_branch, \"refs/heads/\", 11))\n+\t\tcurrent_branch += 11;\n+\n+\twhile (fgets(line, sizeof(line), in)) {\n+\t\ti++;\n+\t\tif (line[0] == 0)\n+\t\t\tcontinue;\n+\t\tif (handle_line(line))\n+\t\t\tdie (\"Error in line %d: %s\", i, line);\n+\t}\n+\n+\tprintf(\"Merge \");\n+\tfor (i = 0; i < srcs.nr; i++) {\n+\t\tstruct src_data *src_data = srcs.payload[i];\n+\t\tconst char *subsep = \"\";\n+\n+\t\tprintf(sep);\n+\t\tsep = \"; \";\n+\n+\t\tif (src_data->head_status == 1) {\n+\t\t\tprintf(srcs.list[i]);\n+\t\t\tcontinue;\n+\t\t}\n+\t\tif (src_data->head_status == 3) {\n+\t\t\tsubsep = \", \";\n+\t\t\tprintf(\"HEAD\");\n+\t\t}\n+\t\tif (src_data->branch.nr) {\n+\t\t\tprintf(subsep);\n+\t\t\tsubsep = \", \";\n+\t\t\tprint_joined(\"branch \", \"branches \", &src_data->branch);\n+\t\t}\n+\t\tif (src_data->r_branch.nr) {\n+\t\t\tprintf(subsep);\n+\t\t\tsubsep = \", \";\n+\t\t\tprint_joined(\"remote branch \", \"remote branches \",\n+\t\t\t\t\t&src_data->r_branch);\n+\t\t}\n+\t\tif (src_data->tag.nr) {\n+\t\t\tprintf(subsep);\n+\t\t\tsubsep = \", \";\n+\t\t\tprint_joined(\"tag \", \"tags \", &src_data->tag);\n+\t\t}\n+\t\tif (src_data->generic.nr) {\n+\t\t\tprintf(subsep);\n+\t\t\tprint_joined(\"commit \", \"commits \", &src_data->generic);\n+\t\t}\n+\t\tif (strcmp(\".\", srcs.list[i]))\n+\t\t\tprintf(\" of %s\", srcs.list[i]);\n+\t}\n+\n+\tif (!strcmp(\"master\", current_branch))\n+\t\tputchar('\\n');\n+\telse\n+\t\tprintf(\" into %s\\n\", current_branch);\n+\n+\tif (merge_summary) {\n+\t\tstruct commit *head;\n+\t\tstruct rev_info rev;\n+\n+\t\thead = lookup_commit(head_sha1);\n+\t\tinit_revisions(&rev);\n+\t\trev.commit_format = CMIT_FMT_ONELINE;\n+\t\trev.ignore_merges = 1;\n+\t\trev.limited = 1;\n+\n+\t\tfor (i = 0; i < origins.nr; i++)\n+\t\t\tshortlog(origins.list[i], origins.payload[i],\n+\t\t\t\t\thead, &rev, limit);\n+\t}\n+\n+\t/* No cleanup yet; is standalone anyway */\n+\n+\treturn 0;\n+}\n+\ndiff --git a/builtin.h b/builtin.h\nold mode 100644\nnew mode 100755\nindex f12d5e6..d9e5483\n--- a/builtin.h\n+++ b/builtin.h\n@@ -49,6 +49,7 @@ extern int cmd_cat_file(int argc, const \n extern int cmd_rev_parse(int argc, const char **argv, char **envp);\n extern int cmd_update_index(int argc, const char **argv, char **envp);\n extern int cmd_update_ref(int argc, const char **argv, char **envp);\n+extern int cmd_fmt_merge_msg(int argc, const char **argv, char **envp);\n \n extern int cmd_write_tree(int argc, const char **argv, char **envp);\n extern int write_tree(unsigned char *sha1, int missing_ok, const char *prefix);\ndiff --git a/git.c b/git.c\nindex 512fa63..7cc826b 100644\n--- a/git.c\n+++ b/git.c\n@@ -200,7 +200,8 @@ static void handle_internal_command(int \n \t\t{ \"mailinfo\", cmd_mailinfo },\n \t\t{ \"stripspace\", cmd_stripspace },\n \t\t{ \"update-index\", cmd_update_index },\n-\t\t{ \"update-ref\", cmd_update_ref }\n+\t\t{ \"update-ref\", cmd_update_ref },\n+\t\t{ \"fmt-merge-msg\", cmd_fmt_merge_msg }\n \t};\n \tint i;\n \n-- \n1.4.1.gb2dcd-dirty\n"},{"id":"23149","messageId":"7vwtaunwj1.fsf@assigned-by-dhcp.cox.net","threadId":"4750","inReplyTo":"Pine.LNX.4.63.0607031717540.29667@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 2nd try] Make git-fmt-merge-msg a builtin","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-07-03T22:39:14Z","receivedAt":"2006-07-03T22:39:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n>\n> ---\n> \tThis retires git-fmt-merge-msg.perl, since it passes all the\n> \ttests, but removes the Perl version not now.\n\nThere is no point not removing the script if you update git.c\nand Makefile to point at the new one.\n\nWe do not have a test specific for fmt-merge-msg, so it\nobviously passes all the tests ;-).  A new one is attached.\n\nI think we should extend boolean to accept 'yes' and 'no', as I\nsuggested earlier on the list, but other than that things look\ngood.\n\nThanks for the patch; no need to resubmit -- I'll munge the\npoints I raised above.\n\n-- >8 --\ndiff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh\nnew file mode 100755\nindex 0000000..63e49f3\n--- /dev/null\n+++ b/t/t6200-fmt-merge-msg.sh\n@@ -0,0 +1,163 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2006, Junio C Hamano\n+#\n+\n+test_description='fmt-merge-msg test'\n+\n+. ./test-lib.sh\n+\n+datestamp=1151939923\n+setdate () {\n+\tGIT_COMMITTER_DATE=\"$datestamp +0200\"\n+\tGIT_AUTHOR_DATE=\"$datestamp +0200\"\n+\tdatestamp=`expr \"$datestamp\" + 1`\n+\texport GIT_COMMITTER_DATE GIT_AUTHOR_DATE\n+}\n+\n+test_expect_success setup '\n+\techo one >one &&\n+\tgit add one &&\n+\tsetdate &&\n+\tgit commit -m \"Initial\" &&\n+\n+\techo uno >one &&\n+\techo dos >two &&\n+\tgit add two &&\n+\tsetdate &&\n+\tgit commit -a -m \"Second\" &&\n+\n+\tgit checkout -b left &&\n+\n+\techo $datestamp >one &&\n+\tsetdate &&\n+\tgit commit -a -m \"Common #1\" &&\n+\n+\techo $datestamp >one &&\n+\tsetdate &&\n+\tgit commit -a -m \"Common #2\" &&\n+\n+\tgit branch right &&\n+\n+\techo $datestamp >two &&\n+\tsetdate &&\n+\tgit commit -a -m \"Left #3\" &&\n+\n+\techo $datestamp >two &&\n+\tsetdate &&\n+\tgit commit -a -m \"Left #4\" &&\n+\n+\techo $datestamp >two &&\n+\tsetdate &&\n+\tgit commit -a -m \"Left #5\" &&\n+\n+\tgit checkout right &&\n+\n+\techo $datestamp >three &&\n+\tgit add three &&\n+\tsetdate &&\n+\tgit commit -a -m \"Right #3\" &&\n+\n+\techo $datestamp >three &&\n+\tsetdate &&\n+\tgit commit -a -m \"Right #4\" &&\n+\n+\techo $datestamp >three &&\n+\tsetdate &&\n+\tgit commit -a -m \"Right #5\" &&\n+\n+\tgit show-branch\n+'\n+\n+cat >expected <<\\EOF\n+Merge branch 'left'\n+EOF\n+\n+test_expect_success 'merge-msg test #1' '\n+\n+\tgit checkout master &&\n+\tgit fetch . left &&\n+\n+\tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n+\tdiff -u actual expected\n+'\n+\n+cat >expected <<\\EOF\n+Merge branch 'left' of ../trash\n+EOF\n+\n+test_expect_success 'merge-msg test #2' '\n+\n+\tgit checkout master &&\n+\tgit fetch ../trash left &&\n+\n+\tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n+\tdiff -u actual expected\n+'\n+\n+cat >expected <<\\EOF\n+Merge branch 'left'\n+\n+* left:\n+  Left #5\n+  Left #4\n+  Left #3\n+  Common #2\n+  Common #1\n+EOF\n+\n+test_expect_success 'merge-msg test #3' '\n+\n+\tgit repo-config merge.summary true &&\n+\n+\tgit checkout master &&\n+\tsetdate &&\n+\tgit fetch . left &&\n+\n+\tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n+\tdiff -u actual expected\n+'\n+\n+cat >expected <<\\EOF\n+Merge branches 'left' and 'right'\n+\n+* left:\n+  Left #5\n+  Left #4\n+  Left #3\n+  Common #2\n+  Common #1\n+\n+* right:\n+  Right #5\n+  Right #4\n+  Right #3\n+  Common #2\n+  Common #1\n+EOF\n+\n+test_expect_success 'merge-msg test #4' '\n+\n+\tgit repo-config merge.summary true &&\n+\n+\tgit checkout master &&\n+\tsetdate &&\n+\tgit fetch . left right &&\n+\n+\tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n+\tdiff -u actual expected\n+'\n+\n+test_expect_success 'merge-msg test #5' '\n+\n+\tgit repo-config merge.summary yes &&\n+\n+\tgit checkout master &&\n+\tsetdate &&\n+\tgit fetch . left right &&\n+\n+\tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n+\tdiff -u actual expected\n+'\n+\n+test_done\n"},{"id":"23194","messageId":"Pine.LNX.4.63.0607040948170.29667@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4750","inReplyTo":"7vwtaunwj1.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 2nd try] Make git-fmt-merge-msg a builtin","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-07-04T07:50:37Z","receivedAt":"2006-07-04T07:50:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 3 Jul 2006, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> >\n> > ---\n> > \tThis retires git-fmt-merge-msg.perl, since it passes all the\n> > \ttests, but removes the Perl version not now.\n> \n> There is no point not removing the script if you update git.c\n> and Makefile to point at the new one.\n\nI should have put PATH/RFC. I did not want to remove the script right \naway, so people could compare outputs (like Martin did with \ngit-format-patch).\n\n> We do not have a test specific for fmt-merge-msg, so it\n> obviously passes all the tests ;-).  A new one is attached.\n\nWell, t4013 showed me two output bugs, but it evidently did not check for \nmerge.summary.\n\n> I think we should extend boolean to accept 'yes' and 'no',\n\nIn that case, could we have \"YesPlease\", \"oui\", \"si\" and \"da\", too? ;-)\n\nCiao,\nDscho\n"},{"id":"23196","messageId":"7vk66tls5o.fsf@assigned-by-dhcp.cox.net","threadId":"4750","inReplyTo":"Pine.LNX.4.63.0607040948170.29667@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 2nd try] Make git-fmt-merge-msg a builtin","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-07-04T07:56:35Z","receivedAt":"2006-07-04T07:56:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> I should have put PATH/RFC. I did not want to remove the script right \n> away, so people could compare outputs (like Martin did with \n> git-format-patch).\n\nWell the stuff is quite straightforward and I think we could fix\nit in-tree while in \"next\".\n\n>> I think we should extend boolean to accept 'yes' and 'no',\n>\n> In that case, could we have \"YesPlease\", \"oui\", \"si\" and \"da\", too? ;-)\n\nHai?  Nah, that's too much.\n"},{"id":"23199","messageId":"Pine.LNX.4.63.0607041017480.29667@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4750","inReplyTo":"7vk66tls5o.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 2nd try] Make git-fmt-merge-msg a builtin","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-07-04T08:18:58Z","receivedAt":"2006-07-04T08:18:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hai^H^H^HHi,\n\nOn Tue, 4 Jul 2006, Junio C Hamano wrote:\n\n> >> I think we should extend boolean to accept 'yes' and 'no',\n> >\n> > In that case, could we have \"YesPlease\", \"oui\", \"si\" and \"da\", too? ;-)\n> \n> Hai?  Nah, that's too much.\n\nYou know, I always wondered if we could introduce \"perhaps\", for us \nprocrastinators.\n\nCiao,\nDscho\n"}]}