{"thread":{"id":"17063","subject":"(unknown)","startedAt":"2009-01-09T19:02:59Z","lastAt":"2009-01-10T10:35:19Z","messageCount":3,"participants":["nathan.panike@gmail.com","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"99807","messageId":"49679f61.1b068e0a.048f.70e4@mx.google.com","threadId":"17063","inReplyTo":null,"subject":"(unknown)","fromName":"","fromEmail":"nathan.panike@gmail.com","sentAt":"2009-01-09T19:02:59Z","receivedAt":"2009-01-09T19:02:59Z","isPatch":false,"sender":{"key":"nathan.panike@gmail.com","avatar":"https://avatars.githubusercontent.com/u/389447?v=4"},"body":">From 65c4fed27fe9752ffd0e3b7cb6807561a4dd4601 Mon Sep 17 00: 00:00 2001\nFrom: Nathan W. Panike <nathan.panike@gmail.com>\nDate: Fri, 9 Jan 2009 11:53:43 -0600\nSubject: [PATCH] Get format-patch to show first commit after root commit\n\nCurrently, the command\n\ngit format-patch -1 e83c5163316f89bfbde\n\nin the git repository creates an empty file.  Instead, one is\nforced to do\n\ngit format-patch -1 --root e83c5163316f89bfbde\n\nThis seems arbitrary.  This patch fixes this case, so that\n\ngit format-patch -1 e83c5163316f89bfbde\n\nwill produce an actual patch.\n---\n builtin-log.c |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 4a02ee9..5e7b61f 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -977,6 +977,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\tlist[nr - 1] = commit;\n \t}\n \ttotal = nr;\n+\tif (total == 1 && !list[0]->parents)\n+\t\trev.show_root_diff=1;\n \tif (!keep_subject && auto_number && total > 1)\n \t\tnumbered = 1;\n \tif (numbered)\n-- \n1.6.1.76.gc123b.dirty\n"},{"id":"99863","messageId":"alpine.DEB.1.00.0901101122570.30769@pacific.mpi-cbg.de","threadId":"17063","inReplyTo":"49679f61.1b068e0a.048f.70e4@mx.google.com","subject":"Re: [PATCH] Get format-patch to show first commit after root commit","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-10T10:27:11Z","receivedAt":"2009-01-10T10:27:11Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nyour mailing process has a problem; neither the recipients nor the subject \nmade it into the mail header.\n\nOn Fri, 9 Jan 2009, nathan.panike@gmail.com wrote:\n\n> >From 65c4fed27fe9752ffd0e3b7cb6807561a4dd4601 Mon Sep 17 00: 00:00 2001\n> From: Nathan W. Panike <nathan.panike@gmail.com>\n> Date: Fri, 9 Jan 2009 11:53:43 -0600\n> Subject: [PATCH] Get format-patch to show first commit after root commit\n> \n> Currently, the command\n> \n> git format-patch -1 e83c5163316f89bfbde\n\nYou do not need -1, and using 19 digits seems a bit arbitrary; the \nconvention seems to be 7 digits (that is what --abbrev-commit does).\n\n> \n> in the git repository creates an empty file.  Instead, one is\n> forced to do\n> \n> git format-patch -1 --root e83c5163316f89bfbde\n> \n> This seems arbitrary.  This patch fixes this case, so that\n> \n> git format-patch -1 e83c5163316f89bfbde\n> \n> will produce an actual patch.\n\nIMHO mentioning --root is misleading, as the real bug is the empty diff.\n\nApart from that, I like the patch, though.\n\nThanks,\nDscho\n"},{"id":"99866","messageId":"alpine.DEB.1.00.0901101134100.30769@pacific.mpi-cbg.de","threadId":"17063","inReplyTo":"alpine.DEB.1.00.0901101122570.30769@pacific.mpi-cbg.de","subject":"Re: [PATCH] Get format-patch to show first commit after root commit","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-10T10:35:19Z","receivedAt":"2009-01-10T10:35:19Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 10 Jan 2009, Johannes Schindelin wrote:\n\n> On Fri, 9 Jan 2009, nathan.panike@gmail.com wrote:\n> \n> > >From 65c4fed27fe9752ffd0e3b7cb6807561a4dd4601 Mon Sep 17 00: 00:00 2001\n> > From: Nathan W. Panike <nathan.panike@gmail.com>\n> > Date: Fri, 9 Jan 2009 11:53:43 -0600\n> > Subject: [PATCH] Get format-patch to show first commit after root commit\n> > \n> > Currently, the command\n> > \n> > git format-patch -1 e83c5163316f89bfbde\n> \n> You do not need -1, and using 19 digits seems a bit arbitrary; the \n> convention seems to be 7 digits (that is what --abbrev-commit does).\n\nSorry, the -1 is needed.\n\nCiao,\nDscho\n"}]}