{"thread":{"id":"4042","subject":"git-feed-mail-list.sh","startedAt":"2006-05-03T17:48:33Z","lastAt":"2006-05-10T08:49:07Z","messageCount":24,"participants":["David Woodhouse","Junio C Hamano","Linus Torvalds","Bertrand Jacquin","Martin Mares"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"19455","messageId":"1146678513.20773.45.camel@pmac.infradead.org","threadId":"4042","inReplyTo":null,"subject":"git-feed-mail-list.sh","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2006-05-03T17:48:33Z","receivedAt":"2006-05-03T17:48:33Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"I've just updated the script which feeds the\ngit-commits-{head,24}@vger.kernel.org lists -- it now looks like this...\n\n- Git-only; no longer uses cg-*\n- No longer uses its own clone repo -- works directly from the original\n- Handles MIME encoding of Subject: headers when necessary\n  (although this is a bit icky in shell; especially _my_ shell).\n\nShould I be using git-format-patch for this?\n\n-- \ndwmw2\n"},{"id":"19497","messageId":"7vmzdy9zl2.fsf@assigned-by-dhcp.cox.net","threadId":"4042","inReplyTo":"1146678513.20773.45.camel@pmac.infradead.org","subject":"Re: git-feed-mail-list.sh","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-04T04:35:37Z","receivedAt":"2006-05-04T04:35:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Woodhouse <dwmw2@infradead.org> writes:\n\n> # $FROM specifies the From: header used in the mails. It'll default\n> # to GIT_COMMITTER_EMAIL if that exists, or to `whoami`@`hostname`\n\nI am not sure if this part is tested..\n\n> # Unless configured otherwise, just cat it instead of mailing.\n> if [ -z \"$FROM\" ]; then\n>     if [ -z \"$GIT_COMMITTER_EMAIL\" ]; then \n> \tFROM=\"$GIT_COMMITTER_EMAIL\"\n>     else\n> \tFROM=`whoami`@`hostname`\n>     fi\n> fi\n\nMaybe you meant 'if test -n \"$GIT_COMMITTER_EMAIL\"' here?\n\n> # takes an object and generates the object's parent(s)\n> createmail () {\n>     local commit\n\nIf you were to do bashism local, don't you want to also localize\nother variables like key, SUBHEX, NEWSUB,...?\n\nIt may make sense to enhance format-patch to do the Q encoding,\nso that you do not have to do this part by hand...\n\n> \tgit-diff -B $parent $commit > $TMPCM\n> \tdiffstat -p1 $TMPCM 2>/dev/null\n\nWith GIT 1.3.0 and later:\n\n\tgit diff --patch-with-stat $parent..$commit\n\nwould be simpler here.\n\n> base=$(git-rev-parse $1)\n>\n> if [ -z $2 ]; then\n>     lastmail=`cat $MAILTAG`\n> else\n>     lastmail=$(git-rev-parse $2)\n> fi\n\nlastmail=`git rev-parse --default \"$MAILTAG\" ${2+\"$2\"}`\n\n> if [ -z $1 ]; then\n>     base=$(git-rev-parse HEAD) || exit 1\n> else\n>     base=$(git-rev-parse $1) || exit 1\n> fi\n\nI am not sure if earlier base=$(git-rev-parse $1) is needed if\nyou do this here...\n"},{"id":"19498","messageId":"7v8xpi9xpp.fsf@assigned-by-dhcp.cox.net","threadId":"4042","inReplyTo":"7vmzdy9zl2.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-feed-mail-list.sh","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-04T05:16:02Z","receivedAt":"2006-05-04T05:16:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> David Woodhouse <dwmw2@infradead.org> writes:\n>\n>> # $FROM specifies the From: header used in the mails. It'll default\n>> # to GIT_COMMITTER_EMAIL if that exists, or to `whoami`@`hostname`\n>\n> I am not sure if this part is tested..\n>\n>> # Unless configured otherwise, just cat it instead of mailing.\n>> if [ -z \"$FROM\" ]; then\n>>     if [ -z \"$GIT_COMMITTER_EMAIL\" ]; then \n>> \tFROM=\"$GIT_COMMITTER_EMAIL\"\n>>     else\n>> \tFROM=`whoami`@`hostname`\n>>     fi\n>> fi\n>\n> Maybe you meant 'if test -n \"$GIT_COMMITTER_EMAIL\"' here?\n>\n>> # takes an object and generates the object's parent(s)\n>> createmail () {\n>>     local commit\n>\n> If you were to do bashism local, don't you want to also localize\n> other variables like key, SUBHEX, NEWSUB,...?\n>\n> It may make sense to enhance format-patch to do the Q encoding,\n> so that you do not have to do this part by hand...\n>\n>> \tgit-diff -B $parent $commit > $TMPCM\n>> \tdiffstat -p1 $TMPCM 2>/dev/null\n>\n> With GIT 1.3.0 and later:\n>\n> \tgit diff --patch-with-stat $parent..$commit\n>\n> would be simpler here.\n\nOr at least lose \"diffstat -p1\" and replace it with\n\n\tgit-apply --stat --status\n\nwhich would be more pleasant.\n\n>> if [ -z $2 ]; then\n>>     lastmail=`cat $MAILTAG`\n>> else\n>>     lastmail=$(git-rev-parse $2)\n>> fi\n>\n> lastmail=`git rev-parse --default \"$MAILTAG\" ${2+\"$2\"}`\n\nAs I wrote it this is broken, sorry.\n\nThis assumes you stop doing \"MAILTAG=.git/refs/tags/MailDone\"\nby hand and lose \"do we have GIT_DIR\" logic as well.\nInstead define MAILTAG=tags/MailDone or maybe refs/tags/MailDone\nand let \"git rev-parse --default refs/tags/MailDone\" figure out\nwhat to do when GIT_DIR is set or unset.\n"},{"id":"19730","messageId":"1147131877.2694.37.camel@shinybook.infradead.org","threadId":"4042","inReplyTo":"7vmzdy9zl2.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-feed-mail-list.sh","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2006-05-08T23:44:36Z","receivedAt":"2006-05-08T23:44:36Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Wed, 2006-05-03 at 21:35 -0700, Junio C Hamano wrote:\n> If you were to do bashism local, don't you want to also localize\n> other variables like key, SUBHEX, NEWSUB,...?\n> \n> It may make sense to enhance format-patch to do the Q encoding,\n> so that you do not have to do this part by hand... \n\nYes, that would be useful. We should perhaps to the From: and To:\nheaders too. Here's my current version (thanks for the feedback)...\n\nThe remaining problem is that the invocation of 'date' doesn't work with\nnew versions of coreutils. This...\n\n   date=(${rest#*> })\n   sec=${date[0]}; tz=${date[1]}\n   dtz=${tz/+/+ }; dtz=${dtz/-/- }\n   pdate=\"$(date -Rud \"1970-01-01 UTC + $sec sec $dtz\" 2>/dev/null)\"\n\n... doesn't work any more on FC-5, because:\n\n $ date -Rud '1970-01-01 UTC + 1147104611 sec + 0100'\ndate: invalid date `1970-01-01 UTC + 1147104611 sec + 0100'\n\n-- \ndwmw2\n"},{"id":"19732","messageId":"Pine.LNX.4.64.0605081715270.3718@g5.osdl.org","threadId":"4042","inReplyTo":"1147131877.2694.37.camel@shinybook.infradead.org","subject":"Re: git-feed-mail-list.sh","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-05-09T00:19:14Z","receivedAt":"2006-05-09T00:19:14Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 9 May 2006, David Woodhouse wrote:\n> \n> The remaining problem is that the invocation of 'date' doesn't work with\n> new versions of coreutils. This...\n> \n>    date=(${rest#*> })\n>    sec=${date[0]}; tz=${date[1]}\n>    dtz=${tz/+/+ }; dtz=${dtz/-/- }\n>    pdate=\"$(date -Rud \"1970-01-01 UTC + $sec sec $dtz\" 2>/dev/null)\"\n> \n> ... doesn't work any more on FC-5, because:\n\nWell, you might choose to just not use \"git-cat-file commit\" but instead \nask git to format the thing for you.\n\nIe you could probably more easily parse the data from something like\n\n\tgit show -B --patch-with-stat --pretty=fuller $commit\n\ninstead of using \"git-cat-file commit $commit\" and generating the stat and \ndiff manually.\n\nThat way you get the dates etc pretty-printed for you by git.\n\n\t\t\tLinus\n"},{"id":"19734","messageId":"1147134522.2694.45.camel@shinybook.infradead.org","threadId":"4042","inReplyTo":"Pine.LNX.4.64.0605081715270.3718@g5.osdl.org","subject":"Re: git-feed-mail-list.sh","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2006-05-09T00:28:42Z","receivedAt":"2006-05-09T00:28:42Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Mon, 2006-05-08 at 17:19 -0700, Linus Torvalds wrote:\n> Well, you might choose to just not use \"git-cat-file commit\" but instead \n> ask git to format the thing for you.\n> \n> Ie you could probably more easily parse the data from something like\n> \n> \tgit show -B --patch-with-stat --pretty=fuller $commit\n> \n> instead of using \"git-cat-file commit $commit\" and generating the stat and \n> diff manually.\n> \n> That way you get the dates etc pretty-printed for you by git.\n\nAha, thanks. Git has learned to do a lot more since I first started\nhacking up a copy of git-log.sh to feed the mailing lists, and it even\nhad to walk the commit tree manually :)\n\nThe output of (the undocumented) '--pretty=fuller' is probably good\nenough that I can just feed the mailing list with it directly. I think I\nhave to add the commit and the parent manually, but that's easy enough\nto do -- the commit is obviously known, and the parent is just\n$(git-rev-parse $commit^1).\n\nAnyone got any objections to switching the kernel git-commits-* lists to\nthis format?\n\n-- \ndwmw2\n"},{"id":"19735","messageId":"7vu080c9uv.fsf@assigned-by-dhcp.cox.net","threadId":"4042","inReplyTo":"1147134522.2694.45.camel@shinybook.infradead.org","subject":"Re: git-feed-mail-list.sh","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-09T00:36:40Z","receivedAt":"2006-05-09T00:36:40Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Woodhouse <dwmw2@infradead.org> writes:\n\n> ... I think I\n> have to add the commit and the parent manually, but that's easy enough\n> to do -- the commit is obviously known, and the parent is just\n> $(git-rev-parse $commit^1).\n\nIf you are going to parse it anyway, this would probably be easier.\n\n\t$ git show --patch-with-stat --pretty=fuller --parents \"$commit\"\n\nWhy would you want -B, by the way?\n"},{"id":"19737","messageId":"Pine.LNX.4.64.0605081742330.3718@g5.osdl.org","threadId":"4042","inReplyTo":"1147134522.2694.45.camel@shinybook.infradead.org","subject":"Re: git-feed-mail-list.sh","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-05-09T00:45:53Z","receivedAt":"2006-05-09T00:45:53Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 9 May 2006, David Woodhouse wrote:\n> \n> Anyone got any objections to switching the kernel git-commits-* lists to\n> this format?\n\nAs long as the \"commit <sha1>\" id is there (and \"--pretty=fuller\" does \nhave it), I'll be happy. At some point, the commit mailing list didn't \nactually mention the commit ID itself, just the tree/parent IDs.\n\nThe \"fuller\" format should be fine, if you care about committer. Otherwise \njust use the standard \"--pretty\", which drops committer info.\n\n\t\tLinus\n"},{"id":"19738","messageId":"4fb292fa0605081753r1d9e7cb6u3a9b513bcbf2404a@mail.gmail.com","threadId":"4042","inReplyTo":"7vu080c9uv.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-feed-mail-list.sh","fromName":"Bertrand Jacquin","fromEmail":"beber.mailing@gmail.com","sentAt":"2006-05-09T00:53:24Z","receivedAt":"2006-05-09T00:53:24Z","isPatch":false,"sender":{"key":"beber.mailing@gmail.com","avatar":null},"body":"On 5/9/06, Junio C Hamano <junkio@cox.net> wrote:\n>\n> If you are going to parse it anyway, this would probably be easier.\n>\n>         $ git show --patch-with-stat --pretty=fuller --parents \"$commit\"\n>\n> Why would you want -B, by the way?\n\nWhat is --parents for ?\n\nIs there a way to have a --pretty=fuller with date append to Author\nand Commiter name and email instead of have 1 lign after each ?\n\n--\nBeber\n#e.fr@freenode\n"},{"id":"19741","messageId":"4fb292fa0605081755m22e8239cjda0b1ac74b84c0d9@mail.gmail.com","threadId":"4042","inReplyTo":"Pine.LNX.4.64.0605081715270.3718@g5.osdl.org","subject":"Re: git-feed-mail-list.sh","fromName":"Bertrand Jacquin","fromEmail":"beber.mailing@gmail.com","sentAt":"2006-05-09T00:55:48Z","receivedAt":"2006-05-09T00:55:48Z","isPatch":false,"sender":{"key":"beber.mailing@gmail.com","avatar":null},"body":"On 5/9/06, Linus Torvalds <torvalds@osdl.org> wrote:\n>\n> Ie you could probably more easily parse the data from something like\n>\n>         git show -B --patch-with-stat --pretty=fuller $commit\n>\n\nIs there a way to track merge like that ? Documentation is not very\nclear and near from empty.\n\n--\nBeber\n#e.fr@freenode\n"},{"id":"19742","messageId":"7vejz4c8wm.fsf@assigned-by-dhcp.cox.net","threadId":"4042","inReplyTo":"4fb292fa0605081753r1d9e7cb6u3a9b513bcbf2404a@mail.gmail.com","subject":"Re: git-feed-mail-list.sh","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-09T00:57:13Z","receivedAt":"2006-05-09T00:57:13Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Bertrand Jacquin\" <beber.mailing@gmail.com> writes:\n\n> What is --parents for ?\n\nIn the part you did not quote, David wanetd a way to grab the\nparents of the commit in question, so I gave it to him.\n\n> Is there a way to have a --pretty=fuller with date append to Author\n> and Commiter name and email instead of have 1 lign after each ?\n\nsed is your friend.\n"},{"id":"19743","messageId":"4fb292fa0605081759l3665c714h72df01622a36d3ba@mail.gmail.com","threadId":"4042","inReplyTo":"7vejz4c8wm.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-feed-mail-list.sh","fromName":"Bertrand Jacquin","fromEmail":"beber.mailing@gmail.com","sentAt":"2006-05-09T00:59:31Z","receivedAt":"2006-05-09T00:59:31Z","isPatch":false,"sender":{"key":"beber.mailing@gmail.com","avatar":null},"body":"On 5/9/06, Junio C Hamano <junkio@cox.net> wrote:\n> \"Bertrand Jacquin\" <beber.mailing@gmail.com> writes:\n>\n> > What is --parents for ?\n>\n> In the part you did not quote, David wanetd a way to grab the\n> parents of the commit in question, so I gave it to him.\n\nOk, sorry. I read too fast.\n\n--\nBeber\n#e.fr@freenode\n"},{"id":"19744","messageId":"1147136467.2694.53.camel@shinybook.infradead.org","threadId":"4042","inReplyTo":"Pine.LNX.4.64.0605081742330.3718@g5.osdl.org","subject":"Re: git-feed-mail-list.sh","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2006-05-09T01:01:07Z","receivedAt":"2006-05-09T01:01:07Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Mon, 2006-05-08 at 17:45 -0700, Linus Torvalds wrote:\n> As long as the \"commit <sha1>\" id is there (and \"--pretty=fuller\" does \n> have it), I'll be happy.\n\nAh, right. Those are _commit_ IDs in that strange first line. I'll\nreformat those to 'Commit:' and 'Parent:' for the mailing list.\n\nHaving 'git-show --pretty=email' would be nice. I think Junio is working\non something which will achieve that, right?\n\n>  At some point, the commit mailing list didn't \n> actually mention the commit ID itself, just the tree/parent IDs.\n\nYeah, I know -- and I got complaints :)\n\n-- \ndwmw2\n"},{"id":"19745","messageId":"7vac9sc8m3.fsf@assigned-by-dhcp.cox.net","threadId":"4042","inReplyTo":"4fb292fa0605081755m22e8239cjda0b1ac74b84c0d9@mail.gmail.com","subject":"Re: git-feed-mail-list.sh","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-09T01:03:32Z","receivedAt":"2006-05-09T01:03:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Bertrand Jacquin\" <beber.mailing@gmail.com> writes:\n\n> Is there a way to track merge like that?\n\nThe command line you quoted shows the relevant information for\npeople who want to know what happened in that merge.\n\nNamely:\n\n * it always shows the header and the message\n\n * it shows the changes that are not trivial (i.e. merge parents\n   have overlapping different versions and manual resolution\n   resulted in something different from either parents).\n\nIt is not a replacement for format-patch, but I think the commit\nmailing list is not for machines to receive and apply the\nreceived patches, but for humans to inspect, so it would be more\nsuitable than a naive alternative of showing diff from all\nparents concatenated together.\n"},{"id":"19747","messageId":"7v64kgc8ik.fsf@assigned-by-dhcp.cox.net","threadId":"4042","inReplyTo":"1147136467.2694.53.camel@shinybook.infradead.org","subject":"Re: git-feed-mail-list.sh","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-09T01:05:39Z","receivedAt":"2006-05-09T01:05:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Woodhouse <dwmw2@infradead.org> writes:\n\n> Having 'git-show --pretty=email' would be nice. I think Junio is working\n> on something which will achieve that, right?\n\nThat's the replacement of \"git format-patch\".  If you have a\nchance, please try out what's in \"next\".  Johannes did quite a\nnice enhancements.\n"},{"id":"19748","messageId":"4fb292fa0605081809r6aa76baai5eac9823183fc3fc@mail.gmail.com","threadId":"4042","inReplyTo":"7vac9sc8m3.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-feed-mail-list.sh","fromName":"Bertrand Jacquin","fromEmail":"beber.mailing@gmail.com","sentAt":"2006-05-09T01:09:36Z","receivedAt":"2006-05-09T01:09:36Z","isPatch":false,"sender":{"key":"beber.mailing@gmail.com","avatar":null},"body":"On 5/9/06, Junio C Hamano <junkio@cox.net> wrote:\n> \"Bertrand Jacquin\" <beber.mailing@gmail.com> writes:\n>\n> > Is there a way to track merge like that?\n>\n> The command line you quoted shows the relevant information for\n> people who want to know what happened in that merge.\n>\n> Namely:\n>\n>  * it always shows the header and the message\n>\n>  * it shows the changes that are not trivial (i.e. merge parents\n>    have overlapping different versions and manual resolution\n>    resulted in something different from either parents).\n>\n> It is not a replacement for format-patch, but I think the commit\n> mailing list is not for machines to receive and apply the\n> received patches, but for humans to inspect, so it would be more\n> suitable than a naive alternative of showing diff from all\n> parents concatenated together.\n\nThat's right. And don't want to do that.\n\nBut I would like to send an email after merge to inform people that:\n\no tree ``a'' and ``b'' have been merged.\no made by John Doe at a time\no show a diffstat.\no show a --short-log=oneline from merge base.\n\n--\nBeber\n#e.fr@freenode\n"},{"id":"19749","messageId":"1147137170.2694.58.camel@shinybook.infradead.org","threadId":"4042","inReplyTo":"7v64kgc8ik.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-feed-mail-list.sh","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2006-05-09T01:12:50Z","receivedAt":"2006-05-09T01:12:50Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Mon, 2006-05-08 at 18:05 -0700, Junio C Hamano wrote:\n> That's the replacement of \"git format-patch\".  If you have a\n> chance, please try out what's in \"next\".  Johannes did quite a\n> nice enhancements. \n\nI think I'd best wait for it to turn up in the release; preferably\nalready capable of MIME quoting. I don't like touching the scripts which\nfeed the mailing lists :)\n\nThis is what I currently have... since it changes the format I think\nI'll won't deploy it yet -- I'll wait until the \"replacement of\ngit-format-patch\" is done, in case that would change the format _again_.\nI'd rather not change the format I send to the list twice within a few\nweeks.\n\n-- \ndwmw2\n"},{"id":"19750","messageId":"Pine.LNX.4.64.0605081805290.3718@g5.osdl.org","threadId":"4042","inReplyTo":"4fb292fa0605081755m22e8239cjda0b1ac74b84c0d9@mail.gmail.com","subject":"Re: git-feed-mail-list.sh","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-05-09T01:18:17Z","receivedAt":"2006-05-09T01:18:17Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 9 May 2006, Bertrand Jacquin wrote:\n\n> On 5/9/06, Linus Torvalds <torvalds@osdl.org> wrote:\n> > \n> > Ie you could probably more easily parse the data from something like\n> > \n> >         git show -B --patch-with-stat --pretty=fuller $commit\n> > \n> \n> Is there a way to track merge like that ? Documentation is not very\n> clear and near from empty.\n\nSure.\n\nIf you want to track merges and get their patches, add the \"--cc\" flag, \nwhich tells git to use the \"conflict combination patch\" that shows any \nvisible conflicts.\n\n(NOTE NOTE NOTE! This is _not_ the same as showing what conflicted: if you \nedited the result to match one of the original branches, it will be quiet \nin --cc, but if the result of a conflict was something that was in \n_neither_ branch, it will be shown! So most clean merges will not show any \nconflict diff at all, but the diffstat will be shown against the \"first \nparent\").\n\nAnd you probably don't want to abbreviate the parent commit SHA1's (which \nare shown for merges, but not regular commits), so add \"--no-abbrev\".\n\nIf you want to show parents for _all_ commits, you could do something like\n\n  git show --no-abbrev --cc -C --patch-with-stat --pretty=fuller --parents |\n\tsed '1 s/commit [0-9a-f]*/\\0\\nParents:   / ; /^Merge: / d'\n\nwhich removes a potential \"Merge: \" line in favour of listing the parents \non a \"Parents:\" line, and which also shows merges nicely.\n\nThat said, the diffstat for merges is usually just a lot of noise. It's \nsometimes nice (you've merged from a topic branch), but if you have merged \nfrom the mainline _into_ a topic branch, it's just annoying.\n\nSo the above is just a wild suggestion. Caveat emptor.\n\n\t\tLinus\n"},{"id":"19752","messageId":"Pine.LNX.4.64.0605081822140.3718@g5.osdl.org","threadId":"4042","inReplyTo":"1147136467.2694.53.camel@shinybook.infradead.org","subject":"Re: git-feed-mail-list.sh","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-05-09T01:27:49Z","receivedAt":"2006-05-09T01:27:49Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 9 May 2006, David Woodhouse wrote:\n> \n> Ah, right. Those are _commit_ IDs in that strange first line. I'll\n> reformat those to 'Commit:' and 'Parent:' for the mailing list.\n\nRight. That first line (that starts with \"commit\") lists the commit ID, \nand if you say \"--parents\", the commit ID's of the parents will be \nappended.\n\nSo if you want to turn that into \"Commit: <id>\" and \"Parent: <id>\", you'll \nwant to do something like this:\n\n  git show --no-abbrev -C --patch-with-stat --pretty=fuller --parents $commit |\n\tsed '1 s/commit \\([0-9a-f]*\\)/Commit:     \\1\\nParent:    /'\n\nwhich should look pretty (count the spaces to make sure it lines up \nright with the other fields).\n\n(And if you ever want to report on merges, you'll want to change that a \nbit, but it should be reasonably close to the above)\n\n\t\tLinus\n"},{"id":"19755","messageId":"7vwtcvc42s.fsf@assigned-by-dhcp.cox.net","threadId":"4042","inReplyTo":"4fb292fa0605081809r6aa76baai5eac9823183fc3fc@mail.gmail.com","subject":"Re: git-feed-mail-list.sh","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-09T02:41:31Z","receivedAt":"2006-05-09T02:41:31Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Bertrand Jacquin\" <beber.mailing@gmail.com> writes:\n\n> But I would like to send an email after merge to inform people that:\n>\n> o tree ``a'' and ``b'' have been merged.\n> o made by John Doe at a time\n> o show a diffstat.\n> o show a --short-log=oneline from merge base.\n\nForgetting about a fast-forward merge,  (1) and (2) are\navailable in the commit header and the commit log, so is (4) if\nyou enable merge.summary configuration like Linus does in his\nkernel repository.\n\nThe comment on diffstat Linus already made applies to (3), but\nif you want you could do \"git diff --stat HEAD^..HEAD\" to see\nwhat happened to that branch by merging the other branch into\nit.\n"},{"id":"19757","messageId":"Pine.LNX.4.64.0605081951390.3718@g5.osdl.org","threadId":"4042","inReplyTo":"7vwtcvc42s.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-feed-mail-list.sh","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-05-09T03:06:35Z","receivedAt":"2006-05-09T03:06:35Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Mon, 8 May 2006, Junio C Hamano wrote:\n\n> \"Bertrand Jacquin\" <beber.mailing@gmail.com> writes:\n> \n> > But I would like to send an email after merge to inform people that:\n> >\n> > o tree ``a'' and ``b'' have been merged.\n> > o made by John Doe at a time\n> > o show a diffstat.\n> > o show a --short-log=oneline from merge base.\n> \n> Forgetting about a fast-forward merge,  (1) and (2) are\n> available in the commit header and the commit log, so is (4) if\n> you enable merge.summary configuration like Linus does in his\n> kernel repository.\n\nNOTE! Please don't enable \"merge.summary\" if you ever merge from the \nupstream tree. That just looks ugly. Your merge messages will be just \nfilled with crap that has nothing to do with your tree - and everything to \ndo with all the _unrelated_ normal development that happened in the tree.\n\nSo in general, \"merge.summary\" makes sense only for trees that pull from \ndownstreams, and never merge with anything upstream. My tree obviously \ndoes that for the kernel. Think of it as a \"top-level maintainer\" flag, \nalthough it works find also for sub-maintainers as long as they \nsynchronize upwards _purely_ by being pulled from, not by pulling.\n\nBut if you want to get it for any random merges, you can always just do\n\n\tgit log -11 --pretty=oneline ^$commit^ $commit^@ |\n\t\tsed 's/[0-9a-f]* // ; 11 s/.*/\\.\\.\\./' \n\nwhich will show up to the ten first commits that were merged (and turn the \neleventh one, if it exists, into \"...\" - that's a pretty disgusting trick \nto make it show when you left things out).\n\nThat \"^$commit^ $commit^@\" part is important. It may look like some \nderanged git smiley, but it does exactly what you want it to do: take all \nthe parents of the commit, but ignore any commit reachable from the first \none (the \"mainline\" of the person who did the commit).\n\nThe ^@ syntax is obviously pretty new, so it requires a modern git.\n\n\t\tLinus\n"},{"id":"19771","messageId":"7vlktb8y9a.fsf@assigned-by-dhcp.cox.net","threadId":"4042","inReplyTo":"Pine.LNX.4.64.0605081805290.3718@g5.osdl.org","subject":"Re: git-feed-mail-list.sh","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-09T07:15:29Z","receivedAt":"2006-05-09T07:15:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> On Tue, 9 May 2006, Bertrand Jacquin wrote:\n>\n>> On 5/9/06, Linus Torvalds <torvalds@osdl.org> wrote:\n>> > \n>> > Ie you could probably more easily parse the data from something like\n>> > \n>> >         git show -B --patch-with-stat --pretty=fuller $commit\n>> \n>> Is there a way to track merge like that ? Documentation is not very\n>> clear and near from empty.\n>\n> Sure.\n>\n> If you want to track merges and get their patches, add the \"--cc\" flag, \n> which tells git to use the \"conflict combination patch\" that shows any \n> visible conflicts.\n\nActually, show defaults to --cc so what's shown is good as is.\n\n> That said, the diffstat for merges is usually just a lot of noise. It's \n> sometimes nice (you've merged from a topic branch), but if you have merged \n> from the mainline _into_ a topic branch, it's just annoying.\n\nTrue.  We made --cc --patch-with-stat to do the combined patch\ntext with diffstat for first-parent-diff to make it most natural\nfor merging into upstream, not merging from upstream.\n"},{"id":"19773","messageId":"7v7j4v8xh3.fsf@assigned-by-dhcp.cox.net","threadId":"4042","inReplyTo":"Pine.LNX.4.64.0605081951390.3718@g5.osdl.org","subject":"Re: git-feed-mail-list.sh","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-09T07:32:24Z","receivedAt":"2006-05-09T07:32:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> But if you want to get it for any random merges, you can always just do\n>\n> \tgit log -11 --pretty=oneline ^$commit^ $commit^@ |\n> \t\tsed 's/[0-9a-f]* // ; 11 s/.*/\\.\\.\\./' \n>\n> which will show up to the ten first commits that were merged (and turn the \n> eleventh one, if it exists, into \"...\" - that's a pretty disgusting trick \n> to make it show when you left things out).\n>\n> That \"^$commit^ $commit^@\" part is important. It may look like some \n> deranged git smiley, but it does exactly what you want it to do: take all \n> the parents of the commit, but ignore any commit reachable from the first \n> one (the \"mainline\" of the person who did the commit).\n>\n> The ^@ syntax is obviously pretty new, so it requires a modern git.\n\nIt is indeed very quite new.  Merged into \"master\" branch at the\nbeginning of this month.\n\nI often wish we had a straightforward way to tell when a given\nfeature went into the mainline, not just appeared on a topic\nbranch.  In this case, I said:\n\n\t$ git whatchanged -p -S'\"^@\"' master -- revision.c\n\nto find ea4a19 commit (Apr 30 00:54:29 2006 -0700).  But that\nwas when the feature was first made on one of my topic branches,\nwhich is not what I was looking for.\n\nBy looking at gitk, I can then tell 83262e (May 1 01:54:27)\nmerged it to \"next\", and 746437 (May 1 22:55:40) merged it to\n\"master\".\n\nIn general this is an unsolvable question, because I can have a\ntopic branch forked off of the tip of \"master\", cook it for a\nfew days without advancing \"master\" at all, and merge it to\n\"master\" after that.  But such a merge will be a fast-forward.\n"},{"id":"19827","messageId":"mj+md-20060510.084721.9078.atrey@ucw.cz","threadId":"4042","inReplyTo":"1147137170.2694.58.camel@shinybook.infradead.org","subject":"Re: git-feed-mail-list.sh","fromName":"Martin Mares","fromEmail":"mj@ucw.cz","sentAt":"2006-05-10T08:49:07Z","receivedAt":"2006-05-10T08:49:07Z","isPatch":false,"sender":{"key":"mj@ucw.cz","avatar":null},"body":"Hello!\n\n> I think I'd best wait for it to turn up in the release; preferably\n> already capable of MIME quoting.\n\nWouldn't it be easier to feed the output to a MUA and letting it handle\nthe MIME stuff for you?\n\nI am using mutt for this purpose:\n\nmutt -x -e 'set charset=\"utf-8\"; set send_charset=\"us-ascii:iso-8859-2:utf-8\"' -s \"$subj\" \"$recipient\" <$out\n\n\t\t\t\tHave a nice fortnight\n-- \nMartin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/\nFaculty of Math and Physics, Charles University, Prague, Czech Rep., Earth\nNext lecture on time travel will be held on previous Monday.\n"}]}