{"thread":{"id":"7346","subject":"[PATCH] have merge put FETCH_HEAD data in commit message","startedAt":"2007-03-21T12:06:43Z","lastAt":"2007-04-17T07:27:28Z","messageCount":70,"participants":["Michael S. Tsirkin","Junio C Hamano","Jeff King","Andy Parkins","Jakub Narebski","J. Bruce Fields","Shawn O. Pearce","Alex Riesen","Julian Phillips"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"37667","messageId":"20070321120643.GI20583@mellanox.co.il","threadId":"7346","inReplyTo":null,"subject":"[PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-03-21T12:06:43Z","receivedAt":"2007-03-21T12:06:43Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"Hi!\nI often like to fetch some code from others, review and\nthen merge. So:\n\ngit fetch <URL>\ngit log -p FETCH_HEAD\ngit merge FETCH_HEAD\n\nwhich is all good but gets me this message in commit log:\n\n    Merge commit 'FETCH_HEAD' into master\n\nwhich is not very informative.\nI can always fix this up with git commit --amend, but\nI'd like to avoid the extra step.\n\nWould the following patch be appropriate?\n\nSigned-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n\n---\n\ndiff --git a/git-merge.sh b/git-merge.sh\nindex 8759c5a..629611b 100755\n--- a/git-merge.sh\n+++ b/git-merge.sh\n@@ -108,6 +108,10 @@ merge_name () {\n \t\tgit-show-ref -q --verify \"refs/heads/$truname\" 2>/dev/null\n \tthen\n \t\techo \"$rh\t\tbranch '$truname' (early part) of .\"\n+\telif test -r \"$GIT_DIR/$remote\"\n+\tthen\n+\t\techo -n \"$rh\t\t\"\n+\t\tgrep -v not-for-merge \"$GIT_DIR/$remote\"\n \telse\n \t\techo \"$rh\t\tcommit '$remote'\"\n \tfi\n"},{"id":"37677","messageId":"7v648u38ws.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070321120643.GI20583@mellanox.co.il","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-21T15:37:07Z","receivedAt":"2007-03-21T15:37:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n> Hi!\n> I often like to fetch some code from others, review and\n> then merge. So:\n>\n> git fetch <URL>\n> git log -p FETCH_HEAD\n> git merge FETCH_HEAD\n>\n> which is all good but gets me this message in commit log:\n>\n>     Merge commit 'FETCH_HEAD' into master\n>\n> which is not very informative.\n> I can always fix this up with git commit --amend, but\n> I'd like to avoid the extra step.\n>\n> Would the following patch be appropriate?\n>\n> Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n\nWould \"Hi!\" and \"Would the following be appropriate?\" be part of\nthe final commit log message?\n\nI often hear from people who seems to like \"fetch & merge\",\ninstead of \"pull & reset ORIG_HEAD\", as a workflow to avoid\nundesirable merging.  This might largely be a matter of taste,\nbut from philosophical point of view, fetch & merge is a sign of\ndistrust (your default is not to merge, and you merge only when\nyou choose to), and pull & reset is the opposite (your default\nis to merge, and after you inspect you may choose not to merge).\nTool support to encourage the former feels somewhat wrong.\n\nHaving said that, since that comes up every now and then, I\nsuspect it might make sense to have an optional behaviour in\n\"git pull\" that lets you say...\n\n\t$ git pull --preview $URL $refspec\n\nwhich runs the following:\n\n\t. git fetch\n        . git log -p `sed -e '/\tnot-for-merge\t/d'\\\n        .\t-e 's/\t.*//' $GIT_DIR/FETCH_HEAD` \\\n        .\t--not HEAD\n\t. asks you if you want to conclude this with a merge\n\t. git merge if told, otherwise abort.\n\nThe \"git-log\" above reads \"give me the commits that are\nreachable from commits that are scheduled for merge but not in\nthe current HEAD\", i.e. the ones that will get merged.\n\n> diff --git a/git-merge.sh b/git-merge.sh\n> index 8759c5a..629611b 100755\n> --- a/git-merge.sh\n> +++ b/git-merge.sh\n> @@ -108,6 +108,10 @@ merge_name () {\n>  \t\tgit-show-ref -q --verify \"refs/heads/$truname\" 2>/dev/null\n>  \tthen\n>  \t\techo \"$rh\t\tbranch '$truname' (early part) of .\"\n> +\telif test -r \"$GIT_DIR/$remote\"\n> +\tthen\n> +\t\techo -n \"$rh\t\t\"\n> +\t\tgrep -v not-for-merge \"$GIT_DIR/$remote\"\n>  \telse\n>  \t\techo \"$rh\t\tcommit '$remote'\"\n>  \tfi\n\nThis 'not-for-merge' grep is only good while merging FETCH_HEAD,\nand will not work for any other random stuff in \"$GIT_DIR\", so\nat least it should be more specific, not just checking if it is\nthe name of a readable file in $GIT_DIR.  Somebody might find\ngood usecases for doing \"git merge ORIG_HEAD\" or \"git merge\nrefs/bases/tutorial\", for example, and your echo & grep would do\nsomething \"interesting\".\n\nEvery time I added \"echo -n\" from my sloppiness, somebody sent\nin a patch to replace it with \"printf\".  I think people on non\nLinux platforms would hate you for using \"echo -n\" (I should bug\nTytso about this with git-mergetool).\n\nI am not sure what you meant by echo -n and grep -v.  Other\ncodepaths in the if-else chain seems to create $rh (the value of\nthe single commit being merged) followed by two tabs followed by\nthe message, and each line in $GIT_DIR/FETCH_HEAD is already in\nthat format, so I suspect your code duplicates the commit object\nname twice?\n\nEven when you fetch more than one branch in FETCH_HEAD, using\nFETCH_HEAD as an SHA-1 expression always picks up the object\nname on the first line (iow \"git merge FETCH_HEAD\" will not\ncreate an Octopus), so grepping for lines without not-for-merge\nmarker is not correct either.\n\nYou would probably want something like:\n\n\t\t...\n\telif test FETCH_HEAD = \"$remote\" && test -r \"$GIT_DIR/FETCH_HEAD\"\n        then\n        \tsed -e 's/\tnot-for-merge\t/\t\t/' \\\n\t\t    -e 1q \"$GIT_DIR/FETCH_HEAD\"\n\telse\n        \t...\n"},{"id":"37687","messageId":"20070321172916.GC5233@mellanox.co.il","threadId":"7346","inReplyTo":"20070321120643.GI20583@mellanox.co.il","subject":"[PATCHv2] put FETCH_HEAD data in merge commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-03-21T17:29:16Z","receivedAt":"2007-03-21T17:29:16Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Michael S. Tsirkin <mst@dev.mellanox.co.il>:\n> Subject: [PATCH] have merge put FETCH_HEAD data in commit message\n> \n> Hi!\n> I often like to fetch some code from others, review and\n> then merge. So:\n> \n> git fetch <URL>\n> git log -p FETCH_HEAD\n> git merge FETCH_HEAD\n> \n> which is all good but gets me this message in commit log:\n> \n>     Merge commit 'FETCH_HEAD' into master\n> \n> which is not very informative.\n> I can always fix this up with git commit --amend, but\n> I'd like to avoid the extra step.\n> \n> Would the following patch be appropriate?\n\nOK, I since discovered git-fmt-merge-msg does all the necessary formatting,\nso here's a better and smaller patch. Seems to work well for me.\n\nJunio, could you apply this?\n\n-------------------------\n\nMake git-fetch <URL> && git-merge FETCH_HEAD produce same merge message\nas git-pull <URL>\n\nSigned-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n\n---\n\ndiff --git a/git-merge.sh b/git-merge.sh\nindex 8759c5a..1e11593 100755\n--- a/git-merge.sh\n+++ b/git-merge.sh\n@@ -108,6 +108,9 @@ merge_name () {\n \t\tgit-show-ref -q --verify \"refs/heads/$truname\" 2>/dev/null\n \tthen\n \t\techo \"$rh\t\tbranch '$truname' (early part) of .\"\n+\telif test -r \"$GIT_DIR/$remote\"\n+\tthen\n+\t\tcat \"$GIT_DIR/$remote\"\n \telse\n \t\techo \"$rh\t\tcommit '$remote'\"\n \tfi\n-- \nMST\n"},{"id":"37689","messageId":"7vmz261nb7.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070321172916.GC5233@mellanox.co.il","subject":"Re: [PATCHv2] put FETCH_HEAD data in merge commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-21T18:09:00Z","receivedAt":"2007-03-21T18:09:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n>> Quoting Michael S. Tsirkin <mst@dev.mellanox.co.il>:\n>> Subject: [PATCH] have merge put FETCH_HEAD data in commit message\n>> \n>> Hi!\n>> I often like to fetch some code from others, review and\n>> then merge. So:\n>> \n>> git fetch <URL>\n>> git log -p FETCH_HEAD\n>> git merge FETCH_HEAD\n>> \n>> which is all good but gets me this message in commit log:\n>> \n>>     Merge commit 'FETCH_HEAD' into master\n>> \n>> which is not very informative.\n>> I can always fix this up with git commit --amend, but\n>> I'd like to avoid the extra step.\n>> \n>> Would the following patch be appropriate?\n>\n> OK, I since discovered git-fmt-merge-msg does all the necessary formatting,\n> so here's a better and smaller patch. Seems to work well for me.\n>\n> Junio, could you apply this?\n\nI am afraid not.  You missed all the points I raised in my reply.\n"},{"id":"37716","messageId":"20070322043604.GA6303@mellanox.co.il","threadId":"7346","inReplyTo":"7v648u38ws.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-03-22T05:02:02Z","receivedAt":"2007-03-22T05:02:02Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message\n> \n> Would \"Hi!\" and \"Would the following be appropriate?\" be part of\n> the final commit log message?\n\nSigh. I wish there was a way to tell git-am \"ignore text *before* this line\"\njust like --- means ignore text after this line.\n\n-- \nMST\n"},{"id":"37717","messageId":"7vd531yicx.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070322043604.GA6303@mellanox.co.il","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-22T05:09:34Z","receivedAt":"2007-03-22T05:09:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n>> Quoting Junio C Hamano <junkio@cox.net>:\n>> Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message\n>> \n>> Would \"Hi!\" and \"Would the following be appropriate?\" be part of\n>> the final commit log message?\n>\n> Sigh. I wish there was a way to tell git-am \"ignore text *before* this line\"\n> just like --- means ignore text after this line.\n\nWell, I'd sigh back.  I wish people imitated good examples, such as:\n\nMessage-ID: <Pine.LNX.4.63.0703220240590.4045@wbgn013.biozentrum.uni-wuerzburg.de>\n\nwhich is not too hard to follow.\n"},{"id":"37719","messageId":"20070322062805.GD6303@mellanox.co.il","threadId":"7346","inReplyTo":"7vd531yicx.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-03-22T06:28:05Z","receivedAt":"2007-03-22T06:28:05Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message\n> \n> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> \n> >> Quoting Junio C Hamano <junkio@cox.net>:\n> >> Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message\n> >> \n> >> Would \"Hi!\" and \"Would the following be appropriate?\" be part of\n> >> the final commit log message?\n> >\n> > Sigh. I wish there was a way to tell git-am \"ignore text *before* this line\"\n> > just like --- means ignore text after this line.\n> \n> Well, I'd sigh back.  I wish people imitated good examples, such as:\n> \n> Message-ID: <Pine.LNX.4.63.0703220240590.4045@wbgn013.biozentrum.uni-wuerzburg.de>\n\nI know that's how git-am wants the input to look.\nBut I claim that's not how most people *think* or *correspond*.\n\n> which is not too hard to follow.\n\nBTW, is there some way to figure it out besides looking at the code\nor grepping git archives?\n\n-- \nMST\n"},{"id":"37723","messageId":"7vaby5wxyn.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070322062805.GD6303@mellanox.co.il","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-22T07:15:28Z","receivedAt":"2007-03-22T07:15:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n> BTW, is there some way to figure it out besides looking at the code\n> or grepping git archives?\n\nLike SubmittingPatches?\n"},{"id":"37724","messageId":"20070322074051.GA29341@mellanox.co.il","threadId":"7346","inReplyTo":"7vaby5wxyn.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-03-22T07:41:13Z","receivedAt":"2007-03-22T07:41:13Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message\n> \n> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> \n> > BTW, is there some way to figure it out besides looking at the code\n> > or grepping git archives?\n> \n> Like SubmittingPatches?\n\nSubmittingPatches is for people contributing to git.\nBut how are *users* of git-am supposed to figure it out?\n\n-- \nMST\n"},{"id":"37725","messageId":"7vlkhpvgc7.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070322074051.GA29341@mellanox.co.il","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-22T08:21:28Z","receivedAt":"2007-03-22T08:21:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n>> Quoting Junio C Hamano <junkio@cox.net>:\n>> Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message\n>> \n>> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n>> \n>> > BTW, is there some way to figure it out besides looking at the code\n>> > or grepping git archives?\n>> \n>> Like SubmittingPatches?\n>\n> SubmittingPatches is for people contributing to git.\n> But how are *users* of git-am supposed to figure it out?\n\n(1) SubmittingPatches describes the git project policy on patch\n    formatting, which happens to be similar to the kernel\n    project.\n\n(2) Users of git-am, git-format-patch and friends in general are\n    not bound by SubmittingPatches, unless they are contributing\n    to the git project.  As the policy differs from project to\n    project, there is nothing authoritative in git documentation\n    set, nor there should be anything stronger than merely our\n    recommendation.  Yes, SubmittingPatches could be used as one\n    potential BCP that is managed with git, but we are not in\n    any position to impose that to other projects.  In other\n    words, *users* of git-am are not supposed to figure it out.\n    They will not find *their* project policy from git\n    documentation, unless their project happens to be the git\n    project.\n\n(3) However, we are discussing your patch to support \"git merge\n    FETCH_HEAD\" better, which I took as your contribution to the\n    git project.  I asked you to follow the project policy for\n    your contribution, and pointed at the document that\n    describes the policy.\n\nClear?\n\nI think your patch means well, and when polished it might be a\nvaluable addition.  \"Hi!\" and \"Would the following be\nappropriate?\" are the least of the problems I pointed out, but\nto clear the dust, let's finish them with responses: \"Hi to\nyou!\", and \"Yes, what the patch tries to do looks very nice, but\nthere are a few issues I would want you to resolve\" ;-).\n\nTo reiterate the more important points (this is also for my own\npurpose because I do not want the patch lost in this noise we\nare making):\n\n - Checking readability of $GIT_DIR/$remote itself is too loose;\n   the name FETCH_HEAD should explicitly be checked, as that is\n   the file that has the specific format that is understood by\n   fmt-merge-msg.\n\n - \"echo -n\" is to be avoided for portability.\n\n - \"git fetch $URL foo bar\" would leave two lines in FETCH_HEAD;\n   subsequent \"git merge FETCH_HEAD\" would merge only foo.  Pick\n   the first line, stripping out not-for-merge marker and let it\n   processed by fmt-merge-msg.\n"},{"id":"37726","messageId":"20070322083330.GA16915@segfault.peff.net","threadId":"7346","inReplyTo":"7v648u38ws.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-03-22T08:33:31Z","receivedAt":"2007-03-22T08:33:31Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 21, 2007 at 08:37:07AM -0700, Junio C Hamano wrote:\n\n> I often hear from people who seems to like \"fetch & merge\",\n> instead of \"pull & reset ORIG_HEAD\", as a workflow to avoid\n> undesirable merging.  This might largely be a matter of taste,\n> but from philosophical point of view, fetch & merge is a sign of\n> distrust (your default is not to merge, and you merge only when\n> you choose to), and pull & reset is the opposite (your default\n> is to merge, and after you inspect you may choose not to merge).\n> Tool support to encourage the former feels somewhat wrong.\n\nI don't think it necessarily means distrust; I always do a fetch +\ninspect + merge, and I am often fetching my own code to a different\nplatform!\n\nMy reason is that the inspect step takes an arbitrary amount of time,\nand I don't want to lose my place. That is, I might go eat dinner in the\nmiddle of the 'inspect' and then come back. By using my branch head as a\ncheckpoint, I am recording \"I have inspected up to my master\"; when I am\ndone inspecting, the merge moves my checkpoint forward. That way I never\nfail to look over the commits; I don't do this out of distrust, but\nbecause I want to see all of the commits.\n\nI could just use FETCH_HEAD, but it is easy to overwrite accidentally\n(if I do another git-fetch after dinner, not realizing I'm in the middle\nof an inspection already, or if I'm looking to grab more changes). I\ncould also use the reflog, but it will also change if I fetch again in\nthe middle.\n\nOf course, I use this for small-ish projects like git, or personal\nprojects. I don't think trying to glance over every commit to the kernel\nwould be scalable.\n\n-Peff\n"},{"id":"37727","messageId":"20070322083757.GC29341@mellanox.co.il","threadId":"7346","inReplyTo":"7vlkhpvgc7.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-03-22T08:37:57Z","receivedAt":"2007-03-22T08:37:57Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> (2) ... In other\n>     words, *users* of git-am are not supposed to figure it out.\n>     They will not find *their* project policy from git\n>     documentation, unless their project happens to be the git\n>     project.\n\nBut if they don't use the same formatting as git policy requires,\ngit-am will produce a mess of a log, until they\ndiscover the only policy that works with git-am by word of mouth.\n\nSpecifically, as far as a *user* is concerned:\n1. the fact that \"---\" separates commit message from patch, and\n   that text after \"---\" is ignored seems to be undocumented\n2. the fact that message subject is appended to the log,\n   the rules for removing [PATCH] etc from subject seem to be undocumented\n3. if I want to have some text coming *before* the commit\n   message ignored, there's no way to do this\n4. there's no way to override the subject from within the message\n   (like there is with author/From line)\n\n> (3) However, we are discussing your patch to support \"git merge\n>     FETCH_HEAD\" better, which I took as your contribution to the\n>     git project.  I asked you to follow the project policy for\n>     your contribution, and pointed at the document that\n>     describes the policy.\n\nAmen to that, sorry about the formatting.\n\n> To reiterate the more important points (this is also for my own\n> purpose because I do not want the patch lost in this noise we\n> are making):\n> \n>  - Checking readability of $GIT_DIR/$remote itself is too loose;\n>    the name FETCH_HEAD should explicitly be checked, as that is\n>    the file that has the specific format that is understood by\n>    fmt-merge-msg.\n> \n>  - \"echo -n\" is to be avoided for portability.\n> \n>  - \"git fetch $URL foo bar\" would leave two lines in FETCH_HEAD;\n>    subsequent \"git merge FETCH_HEAD\" would merge only foo.  Pick\n>    the first line, stripping out not-for-merge marker and let it\n>    processed by fmt-merge-msg.\n\nThanks, I'll try to address these.\n\n-- \nMST\n"},{"id":"37728","messageId":"7vd531veyi.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070322083330.GA16915@segfault.peff.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-22T08:51:17Z","receivedAt":"2007-03-22T08:51:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> I don't think it necessarily means distrust; I always do a fetch +\n> inspect + merge, and I am often fetching my own code to a different\n> platform!\n>\n> My reason is that the inspect step takes an arbitrary amount of time,\n> and I don't want to lose my place. That is, I might go eat dinner in the\n> middle of the 'inspect' and then come back. By using my branch head as a\n> checkpoint, I am recording \"I have inspected up to my master\"; when I am\n> done inspecting, the merge moves my checkpoint forward.\n\nOh, I very much agree with you, but then I would just use\nanother \"inspection\" branch, like:\n\n\tgit checkout -b inspect-jeffs-work master\n        git pull $jeff\n        git log master..\n        ... takes quite time.\n        ... interrupted, goes back to work on _my_ master\n        git checkout master\n        ... does whatever\n        git checkout inspect-jeffs-work\n        ... continue\n        ... looks good\n        git checkout master\n        git pull $jeff\n\n        git log inspect-jeffs-work..master\n\t... things that jeff did since I inspected them on the branch\n\n        ... If I do not like them ...\n        git reset --hard HEAD^\n\nThe advantage is of course I can get interrupted at any time.\n"},{"id":"37729","messageId":"20070322090730.GF29341@mellanox.co.il","threadId":"7346","inReplyTo":"7vlkhpvgc7.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] Put FETCH_HEAD data in merge commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-03-22T09:07:30Z","receivedAt":"2007-03-22T09:07:30Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"This makes git-fetch <URL> && git-merge FETCH_HEAD produce same merge\nmessage as git-pull <URL>\n\nSigned-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n\n---\n\n> To reiterate the more important points (this is also for my own\n> purpose because I do not want the patch lost in this noise we\n> are making):\n> \n>  - Checking readability of $GIT_DIR/$remote itself is too loose;\n>    the name FETCH_HEAD should explicitly be checked, as that is\n>    the file that has the specific format that is understood by\n>    fmt-merge-msg.\n> \n>  - \"echo -n\" is to be avoided for portability.\n> \n>  - \"git fetch $URL foo bar\" would leave two lines in FETCH_HEAD;\n>    subsequent \"git merge FETCH_HEAD\" would merge only foo.  Pick\n>    the first line, stripping out not-for-merge marker and let it\n>    processed by fmt-merge-msg.\n\nIs this OK?\n\ndiff --git a/git-merge.sh b/git-merge.sh\nindex 8759c5a..417bf33 100755\n--- a/git-merge.sh\n+++ b/git-merge.sh\n@@ -108,6 +108,10 @@ merge_name () {\n \t\tgit-show-ref -q --verify \"refs/heads/$truname\" 2>/dev/null\n \tthen\n \t\techo \"$rh\t\tbranch '$truname' (early part) of .\"\n+\telif test \"$remote\" = \"FETCH_HEAD\" -a -r \"$GIT_DIR/FETCH_HEAD\"\n+\tthen\n+\t\tsed -e 's/\tnot-for-merge\t/\t\t/' -e 1q\\\n+\t       \t\t\"$GIT_DIR/FETCH_HEAD\"\n \telse\n \t\techo \"$rh\t\tcommit '$remote'\"\n \tfi\n\n-- \nMST\n"},{"id":"37730","messageId":"20070322090937.GA20421@segfault.peff.net","threadId":"7346","inReplyTo":"7vd531veyi.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-03-22T09:09:37Z","receivedAt":"2007-03-22T09:09:37Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Mar 22, 2007 at 01:51:17AM -0700, Junio C Hamano wrote:\n\n> Oh, I very much agree with you, but then I would just use\n> another \"inspection\" branch, like:\n\nThat makes sense, though for somebody like me who is mostly _tracking_\ndevelopment, I think it's a little simpler to just use master and\norigin.\n\n-Peff\n"},{"id":"37731","messageId":"200703220910.29030.andyparkins@gmail.com","threadId":"7346","inReplyTo":"7v648u38ws.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-03-22T09:10:27Z","receivedAt":"2007-03-22T09:10:27Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"On Wednesday 2007 March 21 15:37, Junio C Hamano wrote:\n\n> I often hear from people who seems to like \"fetch & merge\",\n> instead of \"pull & reset ORIG_HEAD\", as a workflow to avoid\n> undesirable merging.  This might largely be a matter of taste,\n> but from philosophical point of view, fetch & merge is a sign of\n> distrust (your default is not to merge, and you merge only when\n> you choose to), and pull & reset is the opposite (your default\n> is to merge, and after you inspect you may choose not to merge).\n> Tool support to encourage the former feels somewhat wrong.\n\nIt's definitely not wrong - and I realise you aren't advocating removing fetch \n& merge; however I wanted to explain why fetch & merge isn't wrong.  I almost \nnever use pull; in fact, of the two work methods you mention, I can't see \nthat git-pull would ever be the my regular use case (I wonder if I'm missing \nsomething and need enlightening?)\n\nUse case (1)\n\nA colleague and I work on the same project; with fundamentally the same code \nbase.  He commits to one branch and I commit to an other.  I want to be able \nto see what he's doing, but definitely don't want to merge that branch.  \nRegular git-fetch sorts that out.  Occasionally, his branch stabilises to the \npoint were we want to merge my changes in.  I'm more familiar with both \nbranches than him so it's better if I do the merge and resolve the conflicts.  \ngit-merge does that job.\n\nStrangely enough, I've also found that it's better to resolve some commits \nbefore the merge is done.  Using \"git-diff mybranch hisbranch\" often shows \nchanges that are going to conflict, but don't need to - this is usually \nthings like \"// comment this block out while I'm testing something else\".\n\n\nUse case (2):\n\nI keep branches around for submission to git.  Whenever they're ready to go I \nrebase them on to master resolve conflicts and email them in.  That is \ngit-fetch, git-rebase.  I have never run git-pull on my git repository.\n\n\nUse case (3):\n\nI'm tracking an upstream project that uses svn; git-svn makes light work of \nkeeping up to date with it and keeping a \"git-svn\" branch to track it.  I \nkeep my own local changes to it - never for submission upstream - in a \nseparate branch; infrequently I merge the upstream branch into my own.\n\n\nYour favoured case misses out one significant step:\n * git-pull\n * Spend time resolving conflicts\n * git-reset ORIG_HEAD\nIt's not a sign of distrust that I don't do git-pull; I trust git to do a \nfantastic job when that moment comes.  However, it is a sign of laziness - \nwhy should I want to resolve conflicts just so they can be thrown away when I \ndon't like them.\n\n\nAndy\n-- \nDr Andy Parkins, M Eng (hons), MIET\nandyparkins@gmail.com\n"},{"id":"37734","messageId":"7vvegttx4f.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070322090730.GF29341@mellanox.co.il","subject":"Re: [PATCH] Put FETCH_HEAD data in merge commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-22T10:01:52Z","receivedAt":"2007-03-22T10:01:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"},{"id":"37735","messageId":"7vr6rhtvr0.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070322083757.GC29341@mellanox.co.il","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-22T10:31:31Z","receivedAt":"2007-03-22T10:31:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n> Specifically, as far as a *user* is concerned:\n> 1. the fact that \"---\" separates commit message from patch, and\n>    that text after \"---\" is ignored seems to be undocumented\n> 2. the fact that message subject is appended to the log,\n>    the rules for removing [PATCH] etc from subject seem to be undocumented\n> 3. if I want to have some text coming *before* the commit\n>    message ignored, there's no way to do this\n> 4. there's no way to override the subject from within the message\n>    (like there is with author/From line)\n\nHow about this?  Also check t5100 and its sample mailbox,\nespecially the \"third patch\" from A U Thor, which I forwarded\nwith the subject \"another patch\".\n\n---\n\n Documentation/git-am.txt |   27 +++++++++++++++++++++++++++\n 1 files changed, 27 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-am.txt b/Documentation/git-am.txt\nindex 13a7389..148ce40 100644\n--- a/Documentation/git-am.txt\n+++ b/Documentation/git-am.txt\n@@ -87,6 +87,33 @@ default.   You could use `--no-utf8` to override this.\n DISCUSSION\n ----------\n \n+The commit author name is taken from the \"From: \" line of the\n+message, and commit author time is taken from the \"Date: \" line\n+of the message.  The \"Subject: \" line is used as the title of\n+the commit, after stripping common prefix \"[PATCH <anything>]\".\n+It is supposed to describe what the commit is about concisely as\n+a one line text.\n+\n+The body of the message (iow, after a blank line that terminates\n+RFC2822 headers) can begin with \"Subject: \" and \"From: \" lines\n+that are different from those of the mail header, to override\n+the values of these fields.\n+\n+The commit message is formed by the title taken from the\n+\"Subject: \", a blank line and the body of the message up to\n+where the patch begins.  Excess whitespaces at the end of the\n+lines are automatically stripped.\n+\n+The patch is expected to be inline, directly following the\n+message.  Any line that is of form:\n+\n+* three-dashes and end-of-line, or\n+* a line that begins with \"diff -\", or\n+* a line that begins with \"Index: \"\n+\n+is taken as the beginning of a patch, and the commit log message\n+is terminated before the first occurrence of such a line.\n+\n When initially invoking it, you give it names of the mailboxes\n to crunch.  Upon seeing the first patch that does not apply, it\n aborts in the middle, just like 'git-applymbox' does.  You can\n"},{"id":"37736","messageId":"20070322104021.GJ29341@mellanox.co.il","threadId":"7346","inReplyTo":"7vr6rhtvr0.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-03-22T10:40:21Z","receivedAt":"2007-03-22T10:40:21Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message\n> \n> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> \n> > Specifically, as far as a *user* is concerned:\n> > 1. the fact that \"---\" separates commit message from patch, and\n> >    that text after \"---\" is ignored seems to be undocumented\n> > 2. the fact that message subject is appended to the log,\n> >    the rules for removing [PATCH] etc from subject seem to be undocumented\n> > 3. if I want to have some text coming *before* the commit\n> >    message ignored, there's no way to do this\n> > 4. there's no way to override the subject from within the message\n> >    (like there is with author/From line)\n> \n> How about this?\n\nLooks good. What about 3?\n> \n> \n> Also check t5100 and its sample mailbox,\n> especially the \"third patch\" from A U Thor, which I forwarded\n> with the subject \"another patch\".\n\nIt's funny ... but what should I look at there, specifically?\n\n-- \nMST\n"},{"id":"37809","messageId":"eu0m6t$hln$1@sea.gmane.org","threadId":"7346","inReplyTo":"7vr6rhtvr0.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-03-23T13:57:38Z","receivedAt":"2007-03-23T13:57:38Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n\n> +The commit message is formed by the title taken from the\n> +\"Subject: \", a blank line and the body of the message up to\n> +where the patch begins.  Excess whitespaces at the end of the\n> +lines are automatically stripped.\n\nDoes this mean that git-am cannot make a log message that doesn't\nfollow git formatting commit message guidelines, namely short one-line\ndescription, then longer description and signoff? It means that\nyou cannot get log message which starts with paragraph (no emty line\nafter first line of commit message)?\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"37810","messageId":"20070323135930.GB24788@fieldses.org","threadId":"7346","inReplyTo":"eu0m6t$hln$1@sea.gmane.org","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2007-03-23T13:59:30Z","receivedAt":"2007-03-23T13:59:30Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Fri, Mar 23, 2007 at 02:57:38PM +0100, Jakub Narebski wrote:\n> Junio C Hamano wrote:\n> \n> > +The commit message is formed by the title taken from the\n> > +\"Subject: \", a blank line and the body of the message up to\n> > +where the patch begins.  Excess whitespaces at the end of the\n> > +lines are automatically stripped.\n> \n> Does this mean that git-am cannot make a log message that doesn't\n> follow git formatting commit message guidelines, namely short one-line\n> description, then longer description and signoff?\n\nThe input to git-am is email, not log messages.\n\n--b.\n"},{"id":"37814","messageId":"200703231523.58150.jnareb@gmail.com","threadId":"7346","inReplyTo":"20070323135930.GB24788@fieldses.org","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-03-23T14:23:55Z","receivedAt":"2007-03-23T14:23:55Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"J. Bruce Fields wrote:\n> On Fri, Mar 23, 2007 at 02:57:38PM +0100, Jakub Narebski wrote:\n>> Junio C Hamano wrote:\n>> \n>>> +The commit message is formed by the title taken from the\n>>> +\"Subject: \", a blank line and the body of the message up to\n>>> +where the patch begins.  Excess whitespaces at the end of the\n>>> +lines are automatically stripped.\n>> \n>> Does this mean that git-am cannot make a log message that doesn't\n>> follow git formatting commit message guidelines, namely short one-line\n>> description, then longer description and signoff?\n> \n> The input to git-am is email, not log messages.\n\nBut that means that commit message which doesn't have empty line after\nfirst line cannot be send via git-send-email + git-am without changes,\nnot be subject to git-rebase (which uses git-am machinery unless invoked\nwith --merge option) without changing commit message, isn't it?\n\n-- \nJakub Narebski\nPoland\n"},{"id":"37821","messageId":"20070323153314.GA2364@fieldses.org","threadId":"7346","inReplyTo":"200703231523.58150.jnareb@gmail.com","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2007-03-23T15:33:14Z","receivedAt":"2007-03-23T15:33:14Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Fri, Mar 23, 2007 at 03:23:55PM +0100, Jakub Narebski wrote:\n> J. Bruce Fields wrote:\n> > On Fri, Mar 23, 2007 at 02:57:38PM +0100, Jakub Narebski wrote:\n> >> Junio C Hamano wrote:\n> >> \n> >>> +The commit message is formed by the title taken from the\n> >>> +\"Subject: \", a blank line and the body of the message up to\n> >>> +where the patch begins.  Excess whitespaces at the end of the\n> >>> +lines are automatically stripped.\n> >> \n> >> Does this mean that git-am cannot make a log message that doesn't\n> >> follow git formatting commit message guidelines, namely short one-line\n> >> description, then longer description and signoff?\n\nOh, sorry, I see--I misread \"make\" for \"take\" in the above!\n\n> > \n> > The input to git-am is email, not log messages.\n> \n> But that means that commit message which doesn't have empty line after\n> first line cannot be send via git-send-email + git-am without changes,\n> not be subject to git-rebase (which uses git-am machinery unless invoked\n> with --merge option) without changing commit message, isn't it?\n\nYup.\n\nDoesn't seem like a big deal to me.  But then it'd also seem more\nsensible to me if git-rebase worked directly with the original commits\nrather than going through git-format-patch/git-am.  Maybe what I want is\na git-cherry-pick that will accept a range.\n\n--b.\n"},{"id":"37850","messageId":"200703240103.55258.jnareb@gmail.com","threadId":"7346","inReplyTo":"20070323153314.GA2364@fieldses.org","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-03-24T00:03:54Z","receivedAt":"2007-03-24T00:03:54Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"J. Bruce Fields wrote:\n> On Fri, Mar 23, 2007 at 03:23:55PM +0100, Jakub Narebski wrote:\n>> J. Bruce Fields wrote:\n>>> \n>>> The input to git-am is email, not log messages.\n>> \n>> But that means that commit message which doesn't have empty line after\n>> first line cannot be send via git-send-email + git-am without changes,\n>> not be subject to git-rebase (which uses git-am machinery unless invoked\n>> with --merge option) without changing commit message, isn't it?\n> \n> Yup.\n> \n> Doesn't seem like a big deal to me.  But then it'd also seem more\n> sensible to me if git-rebase worked directly with the original commits\n> rather than going through git-format-patch/git-am.  Maybe what I want is\n> a git-cherry-pick that will accept a range.\n\ngit-rebase works directly with original commits if you use merge driven\ngit-rebase, with --merge option (or -s <strategy> option, which implies\n--merge), which is present since Jun 21, 2006.\n\nBTW. I do wonder if \"git rebase --merge\" accepts and honors -C<n> option...\n\n-- \nJakub Narebski\nPoland\n"},{"id":"37870","messageId":"7v7it7kkl9.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070322104021.GJ29341@mellanox.co.il","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-24T10:21:54Z","receivedAt":"2007-03-24T10:21:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n>> > 3. if I want to have some text coming *before* the commit\n>> >    message ignored, there's no way to do this\n>> > 4. there's no way to override the subject from within the message\n>> >    (like there is with author/From line)\n>> \n>> How about this?\n>\n> Looks good. What about 3?\n\nWhen e-mailed message has garbage at the beginning (e.g. \"Hi!\"),\ngit users can either run \"commit --amend\" immiediately after\n\"git am\", or edit the mbox with editor before running\n\"applymbox\", so the need has not been felt much us, and that is\nthe primary reason why it is not there.  Additionally we do not\nthink it is particularly a good practice to have \"cover letters\"\nat the top (cf. $gmane/5418), so it was never high priority for\nus to add that feature to encourage such a practice.\n\nHaving said that, on top of the recent work by Don Zickus on\nmailinfo, you _could_ add support for scissors \"^-- >8 --$\" if\nyou want.\n\n>> Also check t5100 and its sample mailbox,\n>> especially the \"third patch\" from A U Thor, which I forwarded\n>> with the subject \"another patch\".\n>\n> It's funny ... but what should I look at there, specifically?\n\nIt is an example that you can override Subject: (#4 above).\n"},{"id":"38586","messageId":"20070404060213.GB31984@mellanox.co.il","threadId":"7346","inReplyTo":"7v7it7kkl9.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-04T06:02:13Z","receivedAt":"2007-04-04T06:02:13Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"Quoting Junio C Hamano <junkio@cox.net>:\nSubject: Re: [PATCH] have merge put FETCH_HEAD data in commit message\n\n> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> \n> >> > 3. if I want to have some text coming *before* the commit\n> >> >    message ignored, there's no way to do this\n> >> > 4. there's no way to override the subject from within the message\n> >> >    (like there is with author/From line)\n> >> \n> >> How about this?\n> >\n> > Looks good. What about 3?\n> \n> When e-mailed message has garbage at the beginning (e.g. \"Hi!\"),\n> git users can either run \"commit --amend\" immiediately after\n> \"git am\",\n\nThis one would overwrite the authorship information though,\nwould it not? I actually wished several times for an --amend-message\ncommit flag that would only edit the message, preserving the author\n(and possibly date?) metadata.\nOf course, I simply copy the author and pass it in --author,\nbut it's somewhat awkward to do. Do others notice this?\n\n*Maybe* git can be even smarter, and notice that only\ncommit message has changed, and preserve the author automatically\nin this case? I haven't looked at how hard that would be to do.\n\n<rant>\nI actually find it awkward that author/summary information is never\nshown during git commit - sometimes one does git commit\non a machine where GIT_AUTHOR_EMAIL has not been setup\ncorrectly, and the result often is mst@mst-desktop.(none).\nOr people sometimes forget that the first line will show up\nin the pretty=short summary and the result is that what\nends up being there is just 2 first lines of the long description.\n\nOne has to remember to always do git log --pretty=short\nafter commit to verify that one did get these details right.\n\nIdeas:\n- Maybe have git-commit display shortlog summary for commit just created?\n- Maybe put Author: (or From:? and maybe Subject:?) line in the pre-formatted\n  commit message, and let the user edit them?\n</rant>\n\n> or edit the mbox with editor before running\n> \"applymbox\", so the need has not been felt much us, and that is\n> the primary reason why it is not there.  Additionally we do not\n> think it is particularly a good practice to have \"cover letters\"\n> at the top (cf. $gmane/5418), so it was never high priority for\n> us to add that feature to encourage such a practice.\n> \n> Having said that, on top of the recent work by Don Zickus on\n> mailinfo, you _could_ add support for scissors \"^-- >8 --$\" if\n> you want.\n\nOK, I thought about this a bit - if the message includes a\ncover letter, I think it's also likely to have an incorrect\nsubject too. So how about simply ignoring text before\nSubject:/From: lines? This makes more sense, for me, than\ninventing yet another git-specific convention. Does this for you?\n\n\n-- \nMST\n"},{"id":"38587","messageId":"7vircc8ybz.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070404060213.GB31984@mellanox.co.il","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-04T06:09:52Z","receivedAt":"2007-04-04T06:09:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n>> When e-mailed message has garbage at the beginning (e.g. \"Hi!\"),\n>> git users can either run \"commit --amend\" immiediately after\n>> \"git am\",\n>\n> This one would overwrite the authorship information though,\n> would it not? I actually wished several times for an --amend-message\n> commit flag that would only edit the message, preserving the author\n> (and possibly date?) metadata.\n> Of course, I simply copy the author and pass it in --author,\n> but it's somewhat awkward to do. Do others notice this?\n>\n> *Maybe* git can be even smarter, and notice that only\n> commit message has changed, and preserve the author automatically\n> in this case? I haven't looked at how hard that would be to do.\n\nMaybe you can try what you complain about out before you rant?\nI amend other people's commit messages after the fact almost\n*every* *day*.\n"},{"id":"38588","messageId":"20070404061856.GD31984@mellanox.co.il","threadId":"7346","inReplyTo":"7vircc8ybz.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-04T06:18:56Z","receivedAt":"2007-04-04T06:18:56Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message\n> \n> > *Maybe* git can be even smarter, and notice that only\n> > commit message has changed, and preserve the author automatically\n> > in this case? I haven't looked at how hard that would be to do.\n> \n> Maybe you can try what you complain about out before you rant?\n> I amend other people's commit messages after the fact almost\n> *every* *day*.\n\nRight. Sorry.\n\n-- \nMST\n"},{"id":"38589","messageId":"20070404061958.GB30309@spearce.org","threadId":"7346","inReplyTo":"7vircc8ybz.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-04-04T06:19:58Z","receivedAt":"2007-04-04T06:19:58Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> > *Maybe* git can be even smarter, and notice that only\n> > commit message has changed, and preserve the author automatically\n> > in this case? I haven't looked at how hard that would be to do.\n> \n> Maybe you can try what you complain about out before you rant?\n> I amend other people's commit messages after the fact almost\n> *every* *day*.\n\nMe too.  And I *know* Junio amends my stuff after applying it to\ngit.git.  Just look back at the history to see how many thinkos\nhe's saved me from...  ;-)\n\n-- \nShawn.\n"},{"id":"38590","messageId":"7v7iss8xo6.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070404060213.GB31984@mellanox.co.il","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-04T06:24:09Z","receivedAt":"2007-04-04T06:24:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message\n>\n>> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n>> \n>> >> > 3. if I want to have some text coming *before* the commit\n>> >> >    message ignored, there's no way to do this\n>> >> > 4. there's no way to override the subject from within the message\n>> >> >    (like there is with author/From line)\n>> >> \n>> >> How about this?\n>> >\n>> > Looks good. What about 3?\n>> \n>> When e-mailed message has garbage at the beginning (e.g. \"Hi!\"),\n>> git users can either run \"commit --amend\" immiediately after\n>> \"git am\",\n>\n> This one would overwrite the authorship information though,\n> would it not? I actually wished several times for an --amend-message\n> commit flag that would only edit the message, preserving the author\n> (and possibly date?) metadata.\n> Of course, I simply copy the author and pass it in --author,\n> but it's somewhat awkward to do. Do others notice this?\n>\n> *Maybe* git can be even smarter, and notice that only\n> commit message has changed, and preserve the author automatically\n> in this case? I haven't looked at how hard that would be to do.\n>\n> <rant>\n> I actually find it awkward that author/summary information is never\n> shown during git commit - sometimes one does git commit\n> on a machine where GIT_AUTHOR_EMAIL has not been setup\n> correctly, and the result often is mst@mst-desktop.(none).\n> Or people sometimes forget that the first line will show up\n> in the pretty=short summary and the result is that what\n> ends up being there is just 2 first lines of the long description.\n>\n> One has to remember to always do git log --pretty=short\n> after commit to verify that one did get these details right.\n>\n> Ideas:\n> - Maybe have git-commit display shortlog summary for commit just created?\n> - Maybe put Author: (or From:? and maybe Subject:?) line in the pre-formatted\n>   commit message, and let the user edit them?\n> </rant>\n>\n>> or edit the mbox with editor before running\n>> \"applymbox\", so the need has not been felt much us, and that is\n>> the primary reason why it is not there.  Additionally we do not\n>> think it is particularly a good practice to have \"cover letters\"\n>> at the top (cf. $gmane/5418), so it was never high priority for\n>> us to add that feature to encourage such a practice.\n>> \n>> Having said that, on top of the recent work by Don Zickus on\n>> mailinfo, you _could_ add support for scissors \"^-- >8 --$\" if\n>> you want.\n>\n> OK, I thought about this a bit - if the message includes a\n> cover letter, I think it's also likely to have an incorrect\n> subject too. So how about simply ignoring text before\n> Subject:/From: lines? This makes more sense, for me, than\n> inventing yet another git-specific convention. Does this for you?\n\nPeople sometimes say something like:\n\n    From: Quim K Holland <qkholland@cox.net>\n    Date: Wed, 4 Apr 2007 09:02:13 +0300\n    Subject: [PATCH] Fix frobnitz while nitfol is in use\n    Message-Id: <20070404060213.GB31984@filfre.cox.net>\n\n    Earlier Sloof Lirpa reported that frobnitz feature has problems\n    when nitfol is running background in this message:\n\n    From: Sloof Lirpa <sitemaster@cox.net>\n    Subject: [BUG] frobnitz garbles its output\n    Message-Id: <20070403060213.GB31984@frotz.cox.net>\n\n    Upon closer inspection, the problem is caused by filfre\n    function firing up prematurely because nitfol process grabs\n    semaphore and never releases it.  Here is a patch to fix\n    this issue...\n\n    Signed-off-by: Quim K Holland <qkholland@cox.net>\n    ---\n    diff --git a/... b/...\n\nAnd that is why we do not even pick up the From: and stuff in\nthe middle of the message.\n\nWe might be able to convince people to adopt a convention to use\nan explicit mark to signal the end of cover letter (or maybe\nmake it an option in .git/config), but one thing we do not\nabsolutely want to do is to pick up \"^(From|Date|Subject): \"\nfrom any random place in the middle of message, let alone\ndiscarding what comes before them.\n\nThat is, something like the following might be acceptable\ninstead:\n\n    From: Sloof Lirpa <sitemaster@cox.net>\n    Subject: [BUG] frobnitz garbles its output\n    Message-Id: <20070403060213.GB31984@frotz.cox.net>\n\n    Quim K Holland's patch fixes the problem I reported earlier,\n    so I am forwarding his patch.  Please apply.\n\n    -- >8 --\n    From: Quim K Holland <qkholland@cox.net>\n    Date: Wed, 4 Apr 2007 09:02:13 +0300\n    Subject: [PATCH] Fix frobnitz while nitfol is in use\n    Message-Id: <20070404060213.GB31984@filfre.cox.net>\n\n    Earlier Sloof Lirpa reported that frobnitz feature has problems\n    when nitfol is running background in this message:\n\n    Upon closer inspection, the problem is caused by filfre\n    function firing up prematurely because nitfol process grabs\n    semaphore and never releases it.  Here is a patch to fix\n    this issue...\n\n    Signed-off-by: Quim K Holland <qkholland@cox.net>\n    ---\n    diff --git a/... b/...\n"},{"id":"38591","messageId":"20070404062447.GA4136@coredump.intra.peff.net","threadId":"7346","inReplyTo":"20070404060213.GB31984@mellanox.co.il","subject":"[PATCH] wt-status: show author info if status.showauthor is set","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-04-04T06:24:48Z","receivedAt":"2007-04-04T06:24:48Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"\nSigned-off-by: Jeff King <peff@peff.net>\n---\nOn Wed, Apr 04, 2007 at 09:02:13AM +0300, Michael S. Tsirkin wrote:\n\n> - Maybe put Author: (or From:? and maybe Subject:?) line in the pre-formatted\n>   commit message, and let the user edit them?\n\nPersonally I think it's just clutter, but hey, it's off by default. Of\ncourse what is the chance that you've turned on status.showauthor in\nyour ~/.gitconfig, but you don't have your identity set up properly? :)\n\nJunio, this is somewhat tongue in cheek, but if people like it, please\ntake it.\n\n Documentation/config.txt |    5 +++++\n wt-status.c              |   10 ++++++++++\n 2 files changed, 15 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex cf1e040..189e703 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -537,6 +537,11 @@ showbranch.default::\n \tThe default set of branches for gitlink:git-show-branch[1].\n \tSee gitlink:git-show-branch[1].\n \n+status.showauthor::\n+\tIf set to true, the output of git-status and the template used\n+\tfor git-commit will show the author's name and email address.\n+\tDefaults to false.\n+\n tar.umask::\n \tBy default, gitlink:git-tar-tree[1] sets file and directories modes\n \tto 0666 or 0777. While this is both useful and acceptable for projects\ndiff --git a/wt-status.c b/wt-status.c\nindex a055990..3c3510c 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -8,6 +8,7 @@\n #include \"revision.h\"\n #include \"diffcore.h\"\n \n+int wt_status_show_author = 0;\n int wt_status_use_color = 0;\n static char wt_status_colors[][COLOR_MAXLEN] = {\n \t\"\",         /* WT_STATUS_HEADER: normal */\n@@ -317,6 +318,11 @@ void wt_status_print(struct wt_status *s)\n \t\t\t\"# %s%s\", on_what, branch_name);\n \t}\n \n+\tif (wt_status_show_author)\n+\t\tcolor_printf_ln(color(WT_STATUS_HEADER),\n+\t\t\t\t\"# author: %s\",\n+\t\t\t\tgit_author_info(0));\n+\n \tif (s->is_initial) {\n \t\tcolor_printf_ln(color(WT_STATUS_HEADER), \"#\");\n \t\tcolor_printf_ln(color(WT_STATUS_HEADER), \"# Initial commit\");\n@@ -356,5 +362,9 @@ int git_status_config(const char *k, const char *v)\n \t\tint slot = parse_status_slot(k, 13);\n \t\tcolor_parse(v, k, wt_status_colors[slot]);\n \t}\n+\tif (!strcmp(k, \"status.showauthor\")) {\n+\t\twt_status_show_author = 1;\n+\t\treturn 0;\n+\t}\n \treturn git_default_config(k, v);\n }\n-- \n1.5.1.rc3.671.gd125-dirty\n"},{"id":"38592","messageId":"7v3b3g8xl5.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070404061958.GB30309@spearce.org","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-04T06:25:58Z","receivedAt":"2007-04-04T06:25:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n> Junio C Hamano <junkio@cox.net> wrote:\n>> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n>> > *Maybe* git can be even smarter, and notice that only\n>> > commit message has changed, and preserve the author automatically\n>> > in this case? I haven't looked at how hard that would be to do.\n>> \n>> Maybe you can try what you complain about out before you rant?\n>> I amend other people's commit messages after the fact almost\n>> *every* *day*.\n>\n> Me too.  And I *know* Junio amends my stuff after applying it to\n> git.git.  Just look back at the history to see how many thinkos\n> he's saved me from...  ;-)\n\nActually, you cannot know.  I may well be editing your mesage in\nmy mailbox before applying, like Linus does.\n"},{"id":"38593","messageId":"7vy7l87iq8.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070404062447.GA4136@coredump.intra.peff.net","subject":"Re: [PATCH] wt-status: show author info if status.showauthor is set","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-04T06:32:15Z","receivedAt":"2007-04-04T06:32:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n> On Wed, Apr 04, 2007 at 09:02:13AM +0300, Michael S. Tsirkin wrote:\n>\n>> - Maybe put Author: (or From:? and maybe Subject:?) line in the pre-formatted\n>>   commit message, and let the user edit them?\n>\n> Personally I think it's just clutter, but hey, it's off by default. Of\n> course what is the chance that you've turned on status.showauthor in\n> your ~/.gitconfig, but you don't have your identity set up properly? :)\n>\n> Junio, this is somewhat tongue in cheek, but if people like it, please\n> take it.\n\nIt may be t-i-c, but on the other hand it might make sense to\nmake git-commit take notice and use it.\n\nIf we were to go that route, I suspect it should not be of form\n\"# author: Who AmI <who.ami@example.com>\".\n\nMaybe the updated git-commit commit log message rule could be:\n\n * If the lines in the first paragraph all begin with \"From: \",\n   or \"Date: \" (you do not have to override all of them), they\n   are used to override authorship information;\n\n * If this feature is used, \"Subject: \" should be among the\n   lines in the first paragraph for consistency.\n\n * Otherwise we will continue doing what we always have been\n   doing.\n"},{"id":"38594","messageId":"20070404063510.GC30309@spearce.org","threadId":"7346","inReplyTo":"7v3b3g8xl5.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] have merge put FETCH_HEAD data in commit message","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-04-04T06:35:10Z","receivedAt":"2007-04-04T06:35:10Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> \"Shawn O. Pearce\" <spearce@spearce.org> writes:\n> > Me too.  And I *know* Junio amends my stuff after applying it to\n> > git.git.  Just look back at the history to see how many thinkos\n> > he's saved me from...  ;-)\n> \n> Actually, you cannot know.  I may well be editing your mesage in\n> my mailbox before applying, like Linus does.\n\nOK, yes, good point.  So maybe my garbage is easier to fix in your\nemail client then with --amend.  ;-)\n\nBut the point of you saving me still holds!\n\nAlthough 1510fea7 sadly was not one of those times...  ;-)\nAt least it was fixed by 5caf9232.\n\n-- \nShawn.\n"},{"id":"38595","messageId":"20070404064917.GE31984@mellanox.co.il","threadId":"7346","inReplyTo":"20070404062447.GA4136@coredump.intra.peff.net","subject":"Re: [PATCH] wt-status: show author info if status.showauthor is set","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-04T06:49:17Z","receivedAt":"2007-04-04T06:49:17Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Jeff King <peff@peff.net>:\n> Subject: [PATCH] wt-status: show author info if status.showauthor is set\n> \n> \n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n> On Wed, Apr 04, 2007 at 09:02:13AM +0300, Michael S. Tsirkin wrote:\n> \n> > - Maybe put Author: (or From:? and maybe Subject:?) line in the pre-formatted\n> >   commit message, and let the user edit them?\n> \n> Personally I think it's just clutter, but hey, it's off by default. Of\n> course what is the chance that you've turned on status.showauthor in\n> your ~/.gitconfig, but you don't have your identity set up properly? :)\n\nThe point is that *someone else* can have showauthor set up in .gitconfig,\nand then he'll be able to use git commit --amend to fix up\nthe identity without using --author explicitly.\n\n-- \nMST\n"},{"id":"38596","messageId":"7vtzvw7hsu.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070404064917.GE31984@mellanox.co.il","subject":"Re: [PATCH] wt-status: show author info if status.showauthor is set","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-04T06:52:17Z","receivedAt":"2007-04-04T06:52:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n>> Personally I think it's just clutter, but hey, it's off by default. Of\n>> course what is the chance that you've turned on status.showauthor in\n>> your ~/.gitconfig, but you don't have your identity set up properly? :)\n>\n> The point is that *someone else* can have showauthor set up in .gitconfig,\n> and then he'll be able to use git commit --amend to fix up\n> the identity without using --author explicitly.\n\nFor that you would need to update git-commit, I think.\n"},{"id":"38597","messageId":"20070404065504.GD30309@spearce.org","threadId":"7346","inReplyTo":"20070404064917.GE31984@mellanox.co.il","subject":"Re: [PATCH] wt-status: show author info if status.showauthor is set","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-04-04T06:55:05Z","receivedAt":"2007-04-04T06:55:05Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> wrote:\n> > Quoting Jeff King <peff@peff.net>:\n> > On Wed, Apr 04, 2007 at 09:02:13AM +0300, Michael S. Tsirkin wrote:\n> > \n> > > - Maybe put Author: (or From:? and maybe Subject:?) line in the pre-formatted\n> > >   commit message, and let the user edit them?\n> > \n> > Personally I think it's just clutter, but hey, it's off by default. Of\n> > course what is the chance that you've turned on status.showauthor in\n> > your ~/.gitconfig, but you don't have your identity set up properly? :)\n> \n> The point is that *someone else* can have showauthor set up in .gitconfig,\n> and then he'll be able to use git commit --amend to fix up\n> the identity without using --author explicitly.\n\nHmm.  Actually I'd like to be able to set (or change) the author\nusing a From: line, much like email headers.  Especially in the case\nof git-commit --amend, as sometimes I make a new commit as myself,\nthen realize *after* I've quit the editor that the patch really\ncame from someone else, and I should record the right author.\n\nAnd no, the patch wasn't really a patch.  It was a set of files\nfrom the user that I manually copy in, then commit.  Though I have\nto wonder why I keep doing that as said user also does use the same\nGit repository as me...  and edits and commits other files on their\nown just fine...  ;-)\n\n-- \nShawn.\n"},{"id":"38598","messageId":"20070404070135.GF31984@mellanox.co.il","threadId":"7346","inReplyTo":"7v7iss8xo6.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] display shortlog after git-commit","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-04T07:01:35Z","receivedAt":"2007-04-04T07:01:35Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"This might be useful to make people review their log messages\nas recorded by git, to make sure they match project guidelines:\namong the things most commonly misconfigured are author mail,\nand the commit title line.\n\nSigned-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n\n---\n\n> I actually find it awkward that author/summary information is never\n> shown during git commit - sometimes one does git commit\n> on a machine where GIT_AUTHOR_EMAIL has not been setup\n> correctly, and the result often is mst@mst-desktop.(none).\n> Or people sometimes forget that the first line will show up\n> in the pretty=short summary and the result is that what\n> ends up being there is just 2 first lines of the long description.\n>\n> One has to remember to always do git log --pretty=short\n> after commit to verify that one did get these details right.\n>\n> Ideas:\n> - Maybe have git-commit display shortlog summary for commit just created?\n\nHopefully this will make people fix the git config up and amend their commits themselves.\nDoes this sound like a good idea?\nBTW, it's a pity that --no-commit-id breaks --pretty=short.\nMaybe use something like --pretty='format:Author: %an <%ae>%n%s' instead?\n\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 292cf96..88e487f 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -650,7 +650,7 @@ then\n \tif test -z \"$quiet\"\n \tthen\n \t\techo \"Created${initial_commit:+ initial} commit $commit\"\n-\t\tgit-diff-tree --shortstat --summary --root --no-commit-id HEAD --\n+\t\tgit-diff-tree --shortstat --pretty=short --summary --root HEAD --\n \tfi\n fi\n \n-- \nMST\n"},{"id":"38599","messageId":"7vps6k7gez.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070404070135.GF31984@mellanox.co.il","subject":"Re: [PATCH] display shortlog after git-commit","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-04T07:22:12Z","receivedAt":"2007-04-04T07:22:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Too noisy for a default.\n"},{"id":"38600","messageId":"7vd52k7dxi.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070404070135.GF31984@mellanox.co.il","subject":"Re: [PATCH] display shortlog after git-commit","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-04T08:15:53Z","receivedAt":"2007-04-04T08:15:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n>> I actually find it awkward that author/summary information is never\n>> shown during git commit - sometimes one does git commit\n>> on a machine where GIT_AUTHOR_EMAIL has not been setup\n>> correctly, and the result often is mst@mst-desktop.(none).\n\nThat is something that needs to be set up once.  I do not think\nit justifies wasting three more lines (one of them being an\nempty line) per every commit.\n\n>> Or people sometimes forget that the first line will show up\n>> in the pretty=short summary and the result is that what\n>> ends up being there is just 2 first lines of the long description.\n>>\n>> One has to remember to always do git log --pretty=short\n>> after commit to verify that one did get these details right.\n\n>> Ideas:\n>> - Maybe have git-commit display shortlog summary for commit just created?\n>\n> Hopefully this will make people fix the git config up and amend their commits themselves.\n> Does this sound like a good idea?\n\nMaybe protect it with \"[user] novice\" in .git/config?  Otherwise\nI think it gets too noisy once you get used to it. \n\nI think reviewing and fixing is best done in the editor (that's\nwhy git-commit does not start reading from stdin when it expects\nyou to type a log message, but gives you an editor), and\npointing out a mistake after the fact, while it is probably\nbetter than not pointing out at all, is not all that useful.  If\nthere is no mistake, it is just an added noise, and if there is\na mistake, the user needs to take another action (i.e. --amend)\nto correct it.\n\nI think a much better thing you could do is to have a mode that\nthe commit log message editor is started with something like\nthis...\n\n\t----------------------------------------------------------------\n\tFrom: A U Thor <au.thor@example.com>\n        Subject: << the summary of the commit comes here >>\n        \n\t# << more detailed explanations come here >>\n\t# Please enter the commit message for your changes.\n        # (comment lines starting with '#' will not be included)\n\t# On branch 'master'\n        # Changes to be committed:\n        # ...\n\t----------------------------------------------------------------\n\nand teach git-commit to notice the first paragraph that is\nformatted like RFC2822 headers, and do appropriate things.\n\n\"Something like\" this patch, although this time I have these two\nwords in quotes because I know the part to unmunge the buffer\nneeds more work.\n\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 292cf96..d7a7b0b 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -546,10 +546,13 @@ else\n fi\n set_reflog_action \"$rloga\"\n \n+summary_mark='<< the summary of the commit comes here >>'\n if test -z \"$no_edit\"\n then\n \t{\n+\t\techo \"$summary_mark\"\n \t\techo \"\"\n+\t\techo \"# << more detailed explanations come here >>\"\n \t\techo \"# Please enter the commit message for your changes.\"\n \t\techo \"# (Comment lines starting with '#' will not be included)\"\n \t\ttest -z \"$only_include_assumed\" || echo \"$only_include_assumed\"\n@@ -579,7 +582,34 @@ case \"$no_edit\" in\n \tesac\n \tgit-var GIT_AUTHOR_IDENT > /dev/null  || die\n \tgit-var GIT_COMMITTER_IDENT > /dev/null  || die\n-\t${VISUAL:-${EDITOR:-vi}} \"$GIT_DIR/COMMIT_EDITMSG\"\n+\t{\n+\t\techo \"From: $(expr \"$(git-var GIT_AUTHOR_IDENT)\" : '\\(.*>\\)')\"\n+\t\tsed -e '1s/^/Subject: /' \"$GIT_DIR/COMMIT_EDITMSG\"\n+\t\techo \"\"\n+\t} >\"$GIT_DIR/COMMIT_EDITMSG+\"\n+\tmv \"$GIT_DIR/COMMIT_EDITMSG+\" \"$GIT_DIR/COMMIT_EDITMSG\"\n+\t${VISUAL:-${EDITOR:-vi}} \"$GIT_DIR/COMMIT_EDITMSG\" || exit\n+\n+\tAU=$(sed -n -e '\n+\t\t/^$/q\n+\t\t/^From: /{\n+\t\t\ts///p\n+\t\t\tq\n+\t}' \"$GIT_DIR/COMMIT_EDITMSG\")\n+\tif\ttest -n \"$AU\" &&\n+\t\tAN=$(expr \"$AU\" : '\\(.*[^ ]\\)  *<') &&\n+\t\tAE=$(expr \"$AU\" : '.*[^ ]  *<\\(.*\\)>$')\n+\tthen\n+\t\tGIT_AUTHOR_NAME=$AN\n+\t\tGIT_AUTHOR_EMAIL=$AE\n+\t\texport GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL\n+\tfi\n+\tsed -e '\n+\t\t/^From: /d\n+\t\t/^Subject: '\"$summary_mark\"'/d\n+\t\ts/^Subject: //\n+\t' \"$GIT_DIR/COMMIT_EDITMSG\" >\"$GIT_DIR/COMMIT_EDITMSG+\"\n+\tmv \"$GIT_DIR/COMMIT_EDITMSG+\" \"$GIT_DIR/COMMIT_EDITMSG\"\n \t;;\n esac\n \n"},{"id":"38615","messageId":"ev08vq$fib$2@sea.gmane.org","threadId":"7346","inReplyTo":"20070404062447.GA4136@coredump.intra.peff.net","subject":"Re: [PATCH] wt-status: show author info if status.showauthor is set","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-04-04T13:28:38Z","receivedAt":"2007-04-04T13:28:38Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Jeff King wrote:\n\n> On Wed, Apr 04, 2007 at 09:02:13AM +0300, Michael S. Tsirkin wrote:\n> \n>> - Maybe put Author: (or From:? and maybe Subject:?) line in the pre-formatted\n>>   commit message, and let the user edit them?\n> \n> Personally I think it's just clutter, but hey, it's off by default. Of\n> course what is the chance that you've turned on status.showauthor in\n> your ~/.gitconfig, but you don't have your identity set up properly? :)\n\nIt can be turned on in /etc/gitconfig (and of course user.name cannot).\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"39372","messageId":"20070415103355.GA12126@mellanox.co.il","threadId":"7346","inReplyTo":"7vd52k7dxi.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] display shortlog after git-commit","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-15T10:33:55Z","receivedAt":"2007-04-15T10:33:55Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] display shortlog after git-commit\n> \n> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> \n> >> I actually find it awkward that author/summary information is never\n> >> shown during git commit - sometimes one does git commit\n> >> on a machine where GIT_AUTHOR_EMAIL has not been setup\n> >> correctly, and the result often is mst@mst-desktop.(none).\n> \n> That is something that needs to be set up once.  I do not think\n> it justifies wasting three more lines (one of them being an\n> empty line) per every commit.\n> \n> >> Or people sometimes forget that the first line will show up\n> >> in the pretty=short summary and the result is that what\n> >> ends up being there is just 2 first lines of the long description.\n> >>\n> >> One has to remember to always do git log --pretty=short\n> >> after commit to verify that one did get these details right.\n> \n> >> Ideas:\n> >> - Maybe have git-commit display shortlog summary for commit just created?\n> >\n> > Hopefully this will make people fix the git config up and amend their commits themselves.\n> > Does this sound like a good idea?\n\nI've been thinking about this idea some more recently.\n\n> Too noisy for a default.\n\nHow about only printing out the shortlog summary?\n\n> Maybe protect it with \"[user] novice\" in .git/config?\n\nOK but [user] novice would have to be set by default then,\notherwise novice won't know he has to enable it :).\n\n> Otherwise\n> I think it gets too noisy once you get used to it. \n\nYou are right. How about only doing this only if\nthe log message is multi-line, and there is no separate summary?\n\n> I think reviewing and fixing is best done in the editor (that's\n> why git-commit does not start reading from stdin when it expects\n> you to type a log message, but gives you an editor), and\n> pointing out a mistake after the fact, while it is probably\n> better than not pointing out at all, is not all that useful.  If\n> there is no mistake, it is just an added noise, and if there is\n> a mistake, the user needs to take another action (i.e. --amend)\n> to correct it.\n> \n> I think a much better thing you could do is to have a mode that\n> the commit log message editor is started with something like\n> this...\n\nThis would work well for author information, but less well for shortlog.\n\n> \t----------------------------------------------------------------\n> \tFrom: A U Thor <au.thor@example.com>\n>         Subject: << the summary of the commit comes here >>\n>         \n> \t# << more detailed explanations come here >>\n> \t# Please enter the commit message for your changes.\n>         # (comment lines starting with '#' will not be included)\n> \t# On branch 'master'\n>         # Changes to be committed:\n>         # ...\n> \t----------------------------------------------------------------\n> \n> and teach git-commit to notice the first paragraph that is\n> formatted like RFC2822 headers, and do appropriate things.\n> \n> \"Something like\" this patch, although this time I have these two\n> words in quotes because I know the part to unmunge the buffer\n> needs more work.\n> \n> diff --git a/git-commit.sh b/git-commit.sh\n> index 292cf96..d7a7b0b 100755\n> --- a/git-commit.sh\n> +++ b/git-commit.sh\n> @@ -546,10 +546,13 @@ else\n>  fi\n>  set_reflog_action \"$rloga\"\n>  \n> +summary_mark='<< the summary of the commit comes here >>'\n>  if test -z \"$no_edit\"\n>  then\n>  \t{\n> +\t\techo \"$summary_mark\"\n>  \t\techo \"\"\n> +\t\techo \"# << more detailed explanations come here >>\"\n>  \t\techo \"# Please enter the commit message for your changes.\"\n>  \t\techo \"# (Comment lines starting with '#' will not be included)\"\n>  \t\ttest -z \"$only_include_assumed\" || echo \"$only_include_assumed\"\n> @@ -579,7 +582,34 @@ case \"$no_edit\" in\n>  \tesac\n>  \tgit-var GIT_AUTHOR_IDENT > /dev/null  || die\n>  \tgit-var GIT_COMMITTER_IDENT > /dev/null  || die\n> -\t${VISUAL:-${EDITOR:-vi}} \"$GIT_DIR/COMMIT_EDITMSG\"\n> +\t{\n> +\t\techo \"From: $(expr \"$(git-var GIT_AUTHOR_IDENT)\" : '\\(.*>\\)')\"\n> +\t\tsed -e '1s/^/Subject: /' \"$GIT_DIR/COMMIT_EDITMSG\"\n> +\t\techo \"\"\n> +\t} >\"$GIT_DIR/COMMIT_EDITMSG+\"\n> +\tmv \"$GIT_DIR/COMMIT_EDITMSG+\" \"$GIT_DIR/COMMIT_EDITMSG\"\n> +\t${VISUAL:-${EDITOR:-vi}} \"$GIT_DIR/COMMIT_EDITMSG\" || exit\n> +\n> +\tAU=$(sed -n -e '\n> +\t\t/^$/q\n> +\t\t/^From: /{\n> +\t\t\ts///p\n> +\t\t\tq\n> +\t}' \"$GIT_DIR/COMMIT_EDITMSG\")\n> +\tif\ttest -n \"$AU\" &&\n> +\t\tAN=$(expr \"$AU\" : '\\(.*[^ ]\\)  *<') &&\n> +\t\tAE=$(expr \"$AU\" : '.*[^ ]  *<\\(.*\\)>$')\n> +\tthen\n> +\t\tGIT_AUTHOR_NAME=$AN\n> +\t\tGIT_AUTHOR_EMAIL=$AE\n> +\t\texport GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL\n> +\tfi\n> +\tsed -e '\n> +\t\t/^From: /d\n> +\t\t/^Subject: '\"$summary_mark\"'/d\n> +\t\ts/^Subject: //\n> +\t' \"$GIT_DIR/COMMIT_EDITMSG\" >\"$GIT_DIR/COMMIT_EDITMSG+\"\n> +\tmv \"$GIT_DIR/COMMIT_EDITMSG+\" \"$GIT_DIR/COMMIT_EDITMSG\"\n>  \t;;\n>  esac\n \n-- \nMST\n"},{"id":"39387","messageId":"7v4pnh4dip.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070415103355.GA12126@mellanox.co.il","subject":"Re: [PATCH] display shortlog after git-commit","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-15T19:57:02Z","receivedAt":"2007-04-15T19:57:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n>> I think a much better thing you could do is to have a mode that\n>> the commit log message editor is started with something like\n>> this...\n>\n> This would work well for author information, but less well for shortlog.\n>\n>> \t----------------------------------------------------------------\n>> \tFrom: A U Thor <au.thor@example.com>\n>>      Subject: << one line summary of the commit comes here >>\n>>         \n>> \t<< more detailed explanations come here >>\n>> \t# Please enter the commit message for your changes.\n>>      # (comment lines starting with '#' will not be included)\n\nCare to share your reasoning behind \"less well for shortlog\" part?\n\nI think a template like the above makes absolutely clear that\nyour log would look like a single summary line, and a separate\nbody of text that explains your change fully, and I do not\nunderstand your concern.\n"},{"id":"39390","messageId":"20070415200939.GC15208@mellanox.co.il","threadId":"7346","inReplyTo":"7v4pnh4dip.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] display shortlog after git-commit","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-15T20:09:39Z","receivedAt":"2007-04-15T20:09:39Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] display shortlog after git-commit\n> \n> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> \n> >> I think a much better thing you could do is to have a mode that\n> >> the commit log message editor is started with something like\n> >> this...\n> >\n> > This would work well for author information, but less well for shortlog.\n> >\n> >> \t----------------------------------------------------------------\n> >> \tFrom: A U Thor <au.thor@example.com>\n> >>      Subject: << one line summary of the commit comes here >>\n> >>         \n> >> \t<< more detailed explanations come here >>\n> >> \t# Please enter the commit message for your changes.\n> >>      # (comment lines starting with '#' will not be included)\n> \n> Care to share your reasoning behind \"less well for shortlog\" part?\n> \n> I think a template like the above makes absolutely clear that\n> your log would look like a single summary line, and a separate\n> body of text that explains your change fully, and I do not\n> understand your concern.\n\nI confess that I forget to add shortlog line myself sometimes,\nand I feel that adding stuff inside comments won't help me\nremember since I'm used to ignoring it.\n\nCurrent git commit output looks like this:\n\tCreated commit 2b7ca2abf7526f13ce334475e0c66f79fbb5c206\n\t1 files changed, 1 insertions(+), 0 deletions(-)\n\nAnd I wander why does it tell me the new commit hash -\nwouldn't displaying the subject make more sense?\nSomething like\n\n\tCreated commit \"Make foobar faster by caching more barbar in foo\"\n\t1 files changed, 1 insertions(+), 0 deletions(-)\n\n-- \nMST\n"},{"id":"39393","messageId":"200704152126.44480.andyparkins@gmail.com","threadId":"7346","inReplyTo":"20070415200939.GC15208@mellanox.co.il","subject":"Re: [PATCH] display shortlog after git-commit","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-04-15T20:26:41Z","receivedAt":"2007-04-15T20:26:41Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"On Sunday 2007, April 15, Michael S. Tsirkin wrote:\n\n> And I wander why does it tell me the new commit hash -\n> wouldn't displaying the subject make more sense?\n> Something like\n>\n> \tCreated commit \"Make foobar faster by caching more barbar in foo\"\n> \t1 files changed, 1 insertions(+), 0 deletions(-)\n\nIf you do a series of \"git commit --amend\"s, you would get an identical \nmessage each time.  Also, I've often found it convenient when doing \nresets, amends, patch splits and movements between branches to be able \nto cut and paste the commit hash still on the terminal into lines like\n\n git commit --amend -c $HASH\n\nI wouldn't object to having the subject as well, but please don't lose \nthe hash - it's very useful.\n\n\nAndy\n-- \nDr Andy Parkins, M Eng (hons), MIET\nandyparkins@gmail.com\n"},{"id":"39394","messageId":"20070415203457.GE15208@mellanox.co.il","threadId":"7346","inReplyTo":"200704152126.44480.andyparkins@gmail.com","subject":"Re: [PATCH] display shortlog after git-commit","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-15T20:34:57Z","receivedAt":"2007-04-15T20:34:57Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Andy Parkins <andyparkins@gmail.com>:\n> Subject: Re: [PATCH] display shortlog after git-commit\n> \n> On Sunday 2007, April 15, Michael S. Tsirkin wrote:\n> \n> > And I wander why does it tell me the new commit hash -\n> > wouldn't displaying the subject make more sense?\n> > Something like\n> >\n> > \tCreated commit \"Make foobar faster by caching more barbar in foo\"\n> > \t1 files changed, 1 insertions(+), 0 deletions(-)\n> \n> If you do a series of \"git commit --amend\"s, you would get an identical \n> message each time.  Also, I've often found it convenient when doing \n> resets, amends, patch splits and movements between branches to be able \n> to cut and paste the commit hash still on the terminal into lines like\n> \n>  git commit --amend -c $HASH\n> \n> I wouldn't object to having the subject as well, but please don't lose \n> the hash - it's very useful.\n\nYes, I see how that would be useful with amends.\n\n-- \nMST\n"},{"id":"39413","messageId":"20070415223909.GG15208@mellanox.co.il","threadId":"7346","inReplyTo":"7vps6k7gez.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] display shortlog after git-commit","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-15T22:39:09Z","receivedAt":"2007-04-15T22:39:09Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"Display the subject of the commit just made.\n\nSigned-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n\n---\n\n> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] display shortlog after git-commit\n> \n> Too noisy for a default.\n\nSo maybe the following isn't too bad?\nThis results in:\n$ ./git-commit.sh --amend\nCreated commit 5633ddde0e35210f607bde063bcbf709e4d20a8d\nDisplay the subject of the commit just made.\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 9e0959a..b2b90f0 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -650,7 +650,7 @@ then\n \tif test -z \"$quiet\"\n \tthen\n \t\techo \"Created${initial_commit:+ initial} commit $commit\"\n-\t\tgit-diff-tree --shortstat --summary --root --no-commit-id HEAD --\n+\t\tgit-diff-tree --shortstat --pretty=\"format:%s\" --summary --root --no-commit-id HEAD --\n \tfi\n fi\n \n\n\n-- \nMST\n"},{"id":"39418","messageId":"7vy7kt1bij.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070415223909.GG15208@mellanox.co.il","subject":"Re: [PATCH] display shortlog after git-commit","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-15T23:08:36Z","receivedAt":"2007-04-15T23:08:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n> Display the subject of the commit just made.\n\nWHY?  You just made the commit.\n\n>> Quoting Junio C Hamano <junkio@cox.net>:\n>> Subject: Re: [PATCH] display shortlog after git-commit\n>> \n>> Too noisy for a default.\n>\n> So maybe the following isn't too bad?\n> This results in:\n> $ ./git-commit.sh --amend\n> Created commit 5633ddde0e35210f607bde063bcbf709e4d20a8d\n> Display the subject of the commit just made.\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n\nI think this is still one line too many.  It _might_ be an\nimprovement if it were\n\n    $ ./git-commit.sh --amend\n    Created commit 5633ddde: Display the subject of the commit just made.\n     1 files changed, 1 insertions(+), 1 deletions(-)\n\nthough...\n"},{"id":"39445","messageId":"20070416035325.GA20304@mellanox.co.il","threadId":"7346","inReplyTo":"7vy7kt1bij.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] display the subject of the commit just made","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-16T03:53:25Z","receivedAt":"2007-04-16T03:53:25Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"Useful e.g. to figure out what I did from screen history,\nor to make sure subject line is short enough and makes sense\non its own.\n\nSigned-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n\n---\n\n> WHY?  You just made the commit.\n\nHopefully answered above.\nThis also gets rid of the only user of --no-commit-id, so we\nshould be able to deprecate this in the future in favor of\n--pretty=format:\n\n> >> Quoting Junio C Hamano <junkio@cox.net>:\n> >> Subject: Re: [PATCH] display shortlog after git-commit\n> >> \n> >> Too noisy for a default.\n> >\n> > So maybe the following isn't too bad?\n> > This results in:\n> > $ ./git-commit.sh --amend\n> > Created commit 5633ddde0e35210f607bde063bcbf709e4d20a8d\n> > Display the subject of the commit just made.\n> >  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> I think this is still one line too many.  It _might_ be an\n> improvement if it were\n> \n>     $ ./git-commit.sh --amend\n>     Created commit 5633ddde: Display the subject of the commit just made.\n>      1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> though...\n\nBetter?\n\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 9e0959a..32257b0 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -649,8 +649,9 @@ then\n \tfi\n \tif test -z \"$quiet\"\n \tthen\n+\t\tcommit=`git-diff-tree --shortstat --pretty=\"format:%h: %s\"\\\n+\t\t       --summary --root HEAD --`\n \t\techo \"Created${initial_commit:+ initial} commit $commit\"\n-\t\tgit-diff-tree --shortstat --summary --root --no-commit-id HEAD --\n \tfi\n fi\n \n \n-- \nMST\n"},{"id":"39458","messageId":"7vwt0cx5jr.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070416035325.GA20304@mellanox.co.il","subject":"Re: [PATCH] display the subject of the commit just made","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-16T05:16:24Z","receivedAt":"2007-04-16T05:16:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n> Better?\n>\n> diff --git a/git-commit.sh b/git-commit.sh\n> index 9e0959a..32257b0 100755\n> --- a/git-commit.sh\n> +++ b/git-commit.sh\n> @@ -649,8 +649,9 @@ then\n>  \tfi\n>  \tif test -z \"$quiet\"\n>  \tthen\n> +\t\tcommit=`git-diff-tree --shortstat --pretty=\"format:%h: %s\"\\\n> +\t\t       --summary --root HEAD --`\n>  \t\techo \"Created${initial_commit:+ initial} commit $commit\"\n> -\t\tgit-diff-tree --shortstat --summary --root --no-commit-id HEAD --\n>  \tfi\n>  fi\n\nClose but no cigar.  You broke it for a merge commit, I think.\n\nPerhaps\n\n\tpretty=\"format:Created${initial_commit:+ initial} commit %h: %s%n\"\n\tgit-diff-tree --always --shortstart --summary --root --pretty=\"$pretty\" HEAD\n"},{"id":"39459","messageId":"20070416053435.GA23255@mellanox.co.il","threadId":"7346","inReplyTo":"7vy7kt1bij.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] display shortlog after git-commit","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-16T05:34:35Z","receivedAt":"2007-04-16T05:34:35Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] display shortlog after git-commit\n> \n> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> \n> > Display the subject of the commit just made.\n> \n> WHY?  You just made the commit.\n\nBTW, Junio, why does git-commit need to display the diffstat?\nYou just made the commit ...\n\n-- \nMST\n"},{"id":"39460","messageId":"20070416054059.GB23255@mellanox.co.il","threadId":"7346","inReplyTo":"7vwt0cx5jr.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] display the subject of the commit just made","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-16T05:40:59Z","receivedAt":"2007-04-16T05:40:59Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] display the subject of the commit just made\n> \n> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> \n> > Better?\n> >\n> > diff --git a/git-commit.sh b/git-commit.sh\n> > index 9e0959a..32257b0 100755\n> > --- a/git-commit.sh\n> > +++ b/git-commit.sh\n> > @@ -649,8 +649,9 @@ then\n> >  \tfi\n> >  \tif test -z \"$quiet\"\n> >  \tthen\n> > +\t\tcommit=`git-diff-tree --shortstat --pretty=\"format:%h: %s\"\\\n> > +\t\t       --summary --root HEAD --`\n> >  \t\techo \"Created${initial_commit:+ initial} commit $commit\"\n> > -\t\tgit-diff-tree --shortstat --summary --root --no-commit-id HEAD --\n> >  \tfi\n> >  fi\n> \n> Close but no cigar.  You broke it for a merge commit, I think.\n\nYes, you are right.\n\n> Perhaps\n> \n> \tpretty=\"format:Created${initial_commit:+ initial} commit %h: %s%n\"\n> \tgit-diff-tree --always --shortstart --summary --root --pretty=\"$pretty\" HEAD\n\nAha, --always should do the trick. I'll check this.\nBTW, a couple of questions:\n1. do we really need the shortstat info?\n2. why is there \"--\" at the end do in the original version?\n\n-- \nMST\n"},{"id":"39461","messageId":"20070416055111.GC23255@mellanox.co.il","threadId":"7346","inReplyTo":"7vwt0cx5jr.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] display the subject of the commit just made","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-16T05:51:11Z","receivedAt":"2007-04-16T05:51:11Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"Display the subject of the commit just made.\n\nUseful e.g. to figure out what I did from screen history,\nor to make sure subject line is short enough and makes sense\non its own.\n\nSigned-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n\n---\n\n> Quoting Junio C Hamano <junkio@cox.net>:\n> Close but no cigar.  You broke it for a merge commit, I think.\n> \n> Perhaps\n> \n> \tpretty=\"format:Created${initial_commit:+ initial} commit %h: %s%n\"\n> \tgit-diff-tree --always --shortstart --summary --root --pretty=\"$pretty\" HEAD\n\nOK, thanks fo rpointing this out.\nBut why the extra %n at the end? The following seems to work well for me:\n\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 9e0959a..f28fc24 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -649,8 +649,9 @@ then\n \tfi\n \tif test -z \"$quiet\"\n \tthen\n+\t\tcommit=`git-diff-tree --always --shortstat --pretty=\"format:%h: %s\"\\\n+\t\t       --summary --root HEAD --`\n \t\techo \"Created${initial_commit:+ initial} commit $commit\"\n-\t\tgit-diff-tree --shortstat --summary --root --no-commit-id HEAD --\n \tfi\n fi\n \n\n-- \nMST\n"},{"id":"39462","messageId":"7vodlox3fx.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070416055111.GC23255@mellanox.co.il","subject":"Re: [PATCH] display the subject of the commit just made","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-16T06:01:54Z","receivedAt":"2007-04-16T06:01:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n> Display the subject of the commit just made.\n>\n> Useful e.g. to figure out what I did from screen history,\n> or to make sure subject line is short enough and makes sense\n> on its own.\n>\n> Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n>\n> ---\n>\n>> Quoting Junio C Hamano <junkio@cox.net>:\n>> Close but no cigar.  You broke it for a merge commit, I think.\n>> \n>> Perhaps\n>> \n>> \tpretty=\"format:Created${initial_commit:+ initial} commit %h: %s%n\"\n>> \tgit-diff-tree --always --shortstart --summary --root --pretty=\"$pretty\" HEAD\n>\n> OK, thanks fo rpointing this out.\n> But why the extra %n at the end?\n\nBecause I *got* *rid* *of* \"echo\".\n"},{"id":"39463","messageId":"7vk5wcx3cd.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070416053435.GA23255@mellanox.co.il","subject":"Re: [PATCH] display shortlog after git-commit","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-16T06:04:02Z","receivedAt":"2007-04-16T06:04:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n>> Quoting Junio C Hamano <junkio@cox.net>:\n>> Subject: Re: [PATCH] display shortlog after git-commit\n>> \n>> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n>> \n>> > Display the subject of the commit just made.\n>> \n>> WHY?  You just made the commit.\n>\n> BTW, Junio, why does git-commit need to display the diffstat?\n> You just made the commit ...\n\nDon't ask me.  It was not my idea.\n\nWe only had --summary per popular list request, and it made\ncertain amount of sense since addition/deletion are notable\nevents that do not happen with _every_ commit.\n"},{"id":"39465","messageId":"7vejmkx2qf.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070416054059.GB23255@mellanox.co.il","subject":"Re: [PATCH] display the subject of the commit just made","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-16T06:17:12Z","receivedAt":"2007-04-16T06:17:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n> BTW, a couple of questions:\n> 1. do we really need the shortstat info?\n\nI am between neutral to slightly negative, so I won't miss it if\nit is removed, but I'll let people who wanted it to defend it.\n\n> 2. why is there \"--\" at the end do in the original version?\n\nBlame is always your friend.\n\n\t$ git blame -L'/^git-diff-tree .*--$/,1' git-commit.sh\n\nfinds that it came from this commit:\n\ncommit 521f9c4def9430526bfdfffdb8ed4c2f4166bece\nAuthor: Michael Loeffler <zvpunry@zvpunry.de>\nDate:   Mon Jan 8 20:23:13 2007 +0100\n\n    git-commit: do not fail to print the diffstat even if there is a file named HEAD\n    \n    Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de>\n    Signed-off-by: Junio C Hamano <junkio@cox.net>\n\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 04aad5e..c2beb76 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -628,7 +628,7 @@ then\n \tif test -z \"$quiet\"\n \tthen\n \t\techo \"Created${initial_commit:+ initial} commit $commit\"\n-\t\tgit-diff-tree --shortstat --summary --root --no-commit-id HEAD\n+\t\tgit-diff-tree --shortstat --summary --root --no-commit-id HEAD --\n \tfi\n fi\n"},{"id":"39466","messageId":"20070416061813.GD23255@mellanox.co.il","threadId":"7346","inReplyTo":"7vodlox3fx.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] display the subject of the commit just made","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-16T06:18:13Z","receivedAt":"2007-04-16T06:18:13Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] display the subject of the commit just made\n> \n> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> \n> > Display the subject of the commit just made.\n> >\n> > Useful e.g. to figure out what I did from screen history,\n> > or to make sure subject line is short enough and makes sense\n> > on its own.\n> >\n> > Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n> >\n> > ---\n> >\n> >> Quoting Junio C Hamano <junkio@cox.net>:\n> >> Close but no cigar.  You broke it for a merge commit, I think.\n> >> \n> >> Perhaps\n> >> \n> >> \tpretty=\"format:Created${initial_commit:+ initial} commit %h: %s%n\"\n> >> \tgit-diff-tree --always --shortstart --summary --root --pretty=\"$pretty\" HEAD\n> >\n> > OK, thanks fo rpointing this out.\n> > But why the extra %n at the end?\n> \n> Because I *got* *rid* *of* \"echo\".\n\nOh.\nBut, this seems to stick an extra newline before the shortstart summary,\ninstead of at the end. No?\n\n ./git-commit.sh --amend\nCreated commit 63cfb8c: test more\n\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\nwhile in my version\n\n ./git-commit.sh --amend\nCreated commit 63cfb8c: test more\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\nso I think we are stuck with echo.\n\n\n-- \nMST\n"},{"id":"39472","messageId":"20070416062640.GE23255@mellanox.co.il","threadId":"7346","inReplyTo":"7vk5wcx3cd.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] display shortlog after git-commit","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-16T06:26:41Z","receivedAt":"2007-04-16T06:26:41Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: [PATCH] display shortlog after git-commit\n> \n> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> \n> >> Quoting Junio C Hamano <junkio@cox.net>:\n> >> Subject: Re: [PATCH] display shortlog after git-commit\n> >> \n> >> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> >> \n> >> > Display the subject of the commit just made.\n> >> \n> >> WHY?  You just made the commit.\n> >\n> > BTW, Junio, why does git-commit need to display the diffstat?\n> > You just made the commit ...\n> \n> Don't ask me.  It was not my idea.\n> \n> We only had --summary per popular list request, and it made\n> certain amount of sense since addition/deletion are notable\n> events that do not happen with _every_ commit.\n\nHmm. I agree. Does it make sense to only show additions/deletions?\n\nDigging through git-commit.sh history, I found this: the log actually\nmisleadingly talks about the summary of created/deleted files.  Is it possible\nthat git-runstatus --shortlog reported just the created/deleted files\noriginally?\n\ncommit ebd124c6783da5e064963611ee17741cd173f6b5\nAuthor: Nicolas Pitre <nico@cam.org>\nDate:   Thu Dec 14 23:15:44 2006 -0500\n\n    make commit message a little more consistent and conforting\n\n    It is nicer to let the user know when a commit succeeded all the time,\n    not only the first time.  Also the commit sha1 is much more useful than\n    the tree sha1 in this case.\n\n    This patch also introduces a -q switch to supress this message as well\n    as the summary of created/deleted files.\n\n    Signed-off-by: Nicolas Pitre <nico@cam.org>\n    Signed-off-by: Junio C Hamano <junkio@cox.net>\n\nIf yes, then is it possible that this change might have been introduced\ninadvetently by git-runstatus behaviour change?\n\nNicolas, what was the intent?\n\n-- \nMST\n"},{"id":"39474","messageId":"20070416065119.GF23255@mellanox.co.il","threadId":"7346","inReplyTo":"20070416061813.GD23255@mellanox.co.il","subject":"Re: [PATCH] display the subject of the commit just made","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-16T06:51:19Z","receivedAt":"2007-04-16T06:51:19Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"Quoting Michael S. Tsirkin <mst@dev.mellanox.co.il>:\n> > Because I *got* *rid* *of* \"echo\".\n> \n> so I think we are stuck with echo.\n\nSo ... is it good to go?\n\n-- \nMST\n"},{"id":"39476","messageId":"7v647wx0q3.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"20070416065119.GF23255@mellanox.co.il","subject":"Re: [PATCH] display the subject of the commit just made","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-16T07:00:36Z","receivedAt":"2007-04-16T07:00:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n\n> Quoting Michael S. Tsirkin <mst@dev.mellanox.co.il>:\n>> > Because I *got* *rid* *of* \"echo\".\n>> \n>> so I think we are stuck with echo.\n>\n> So ... is it good to go?\n\nI am not quite convinced that giving a short summary is\nnecessary yet, probably for the same reason you questioned why\nwe do --shortstat.\n"},{"id":"39477","messageId":"20070416071127.GM2229@spearce.org","threadId":"7346","inReplyTo":"7v647wx0q3.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] display the subject of the commit just made","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-04-16T07:11:27Z","receivedAt":"2007-04-16T07:11:27Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> \"Michael S. Tsirkin\" <mst@dev.mellanox.co.il> writes:\n> \n> > Quoting Michael S. Tsirkin <mst@dev.mellanox.co.il>:\n> >> > Because I *got* *rid* *of* \"echo\".\n> >> \n> >> so I think we are stuck with echo.\n> >\n> > So ... is it good to go?\n> \n> I am not quite convinced that giving a short summary is\n> necessary yet, probably for the same reason you questioned why\n> we do --shortstat.\n\nIts not really necessary, no.\n\nBut when you have 8 terminal windows open, and you haven't looked\nat one in a while, and it has a nice output from current git-reset\nshowing the subject of the commit you just reset to, that's handy\nto jog your memory about what the shell was doing before it got\nshuffled off the desk.\n\nNow look at a git-commit output and find that's missing.  If its\ncheap (and it is, reasonably so) it may be useful to some people.\n\nOf course I'm one of those \"gah, I got more shells than I know what\nI'm doing with!\" people.  ;-)\n\n-- \nShawn.\n"},{"id":"39492","messageId":"20070416075956.GG23255@mellanox.co.il","threadId":"7346","inReplyTo":"20070416071127.GM2229@spearce.org","subject":"Re: [PATCH] display the subject of the commit just made","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-16T07:59:56Z","receivedAt":"2007-04-16T07:59:56Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Of course I'm one of those \"gah, I got more shells than I know what\n> I'm doing with!\" people.  ;-)\n\nMe too :)\n\n-- \nMST\n"},{"id":"39522","messageId":"81b0412b0704160556j6596ab03v2405eadcefe34bd8@mail.gmail.com","threadId":"7346","inReplyTo":"20070416071127.GM2229@spearce.org","subject":"Re: [PATCH] display the subject of the commit just made","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-04-16T12:56:07Z","receivedAt":"2007-04-16T12:56:07Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 4/16/07, Shawn O. Pearce <spearce@spearce.org> wrote:\n> > I am not quite convinced that giving a short summary is\n> > necessary yet, probably for the same reason you questioned why\n> > we do --shortstat.\n>\n> Of course I'm one of those \"gah, I got more shells than I know what\n> I'm doing with!\" people.  ;-)\n>\n\nMe too. Please, can we have it? :)\n"},{"id":"39524","messageId":"20070416144038.GA32515@mellanox.co.il","threadId":"7346","inReplyTo":"7vk5wcx3cd.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] remove shortlog from git-commit output","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-16T14:40:38Z","receivedAt":"2007-04-16T14:40:38Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"Make git-commit only display --summary since addition/deletion\nare notable events that do not happen with every commit.\n\nSigned-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n\n---\n\n> > BTW, Junio, why does git-commit need to display the diffstat?\n> > You just made the commit ...\n> \n> Don't ask me.  It was not my idea.\n> \n> We only had --summary per popular list request, and it made\n> certain amount of sense since addition/deletion are notable\n> events that do not happen with _every_ commit.\n\nSo how about this?\n\ndiff --git a/git-commit.sh b/git-commit.sh\nindex f28fc24..3e6866c 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -649,7 +649,7 @@ then\n \tfi\n \tif test -z \"$quiet\"\n \tthen\n-\t\tcommit=`git-diff-tree --always --shortstat --pretty=\"format:%h: %s\"\\\n+\t\tcommit=`git-diff-tree --always --pretty=\"format:%h: %s\"\\\n \t\t       --summary --root HEAD --`\n \t\techo \"Created${initial_commit:+ initial} commit $commit\"\n \tfi\n\n-- \nMST\n"},{"id":"39526","messageId":"Pine.LNX.4.64.0704161554540.5400@reaper.quantumfyre.co.uk","threadId":"7346","inReplyTo":"20070416144038.GA32515@mellanox.co.il","subject":"Re: [PATCH] remove shortlog from git-commit output","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-04-16T15:02:49Z","receivedAt":"2007-04-16T15:02:49Z","isPatch":true,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"On Mon, 16 Apr 2007, Michael S. Tsirkin wrote:\n\n> Make git-commit only display --summary since addition/deletion\n> are notable events that do not happen with every commit.\n>\n> Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n>\n> ---\n>\n>>> BTW, Junio, why does git-commit need to display the diffstat?\n>>> You just made the commit ...\n>>\n>> Don't ask me.  It was not my idea.\n>>\n>> We only had --summary per popular list request, and it made\n>> certain amount of sense since addition/deletion are notable\n>> events that do not happen with _every_ commit.\n>\n> So how about this?\n>\n\nPersonally I quite like the shortstat ... and certainly is/will be more \nuseful to me than having the commit subject - despite normally having more \nterminals lying around than is good for my sanity.\n\nCan't we keep it? It's not like it takes up much space ...\n\n-- \nJulian\n\n  ---\nBOFH Excuse #134:\n\nbecause of network lag due to too many people playing deathmatch\n"},{"id":"39559","messageId":"7vtzvgtdny.fsf@assigned-by-dhcp.cox.net","threadId":"7346","inReplyTo":"81b0412b0704160556j6596ab03v2405eadcefe34bd8@mail.gmail.com","subject":"Re: [PATCH] display the subject of the commit just made","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-16T17:46:57Z","receivedAt":"2007-04-16T17:46:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Alex Riesen\" <raa.lkml@gmail.com> writes:\n\n> On 4/16/07, Shawn O. Pearce <spearce@spearce.org> wrote:\n>> > I am not quite convinced that giving a short summary is\n>> > necessary yet, probably for the same reason you questioned why\n>> > we do --shortstat.\n>>\n>> Of course I'm one of those \"gah, I got more shells than I know what\n>> I'm doing with!\" people.  ;-)\n>>\n>\n> Me too. Please, can we have it? :)\n\nWill be in.  And --shortstat is not going away.\n"},{"id":"39561","messageId":"20070416182323.GC32515@mellanox.co.il","threadId":"7346","inReplyTo":"Pine.LNX.4.64.0704161554540.5400@reaper.quantumfyre.co.uk","subject":"Re: [PATCH] remove shortlog from git-commit output","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-16T18:23:23Z","receivedAt":"2007-04-16T18:23:23Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Julian Phillips <julian@quantumfyre.co.uk>:\n> Subject: Re: [PATCH] remove shortlog from git-commit output\n> \n> On Mon, 16 Apr 2007, Michael S. Tsirkin wrote:\n> \n> >Make git-commit only display --summary since addition/deletion\n> >are notable events that do not happen with every commit.\n> >\n> >Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n> >\n> >---\n> >\n> >>>BTW, Junio, why does git-commit need to display the diffstat?\n> >>>You just made the commit ...\n> >>\n> >>Don't ask me.  It was not my idea.\n> >>\n> >>We only had --summary per popular list request, and it made\n> >>certain amount of sense since addition/deletion are notable\n> >>events that do not happen with _every_ commit.\n> >\n> >So how about this?\n> >\n> \n> Personally I quite like the shortstat ... and certainly is/will be more \n> useful to me than having the commit subject - despite normally having more \n> terminals lying around than is good for my sanity.\n> \n> Can't we keep it? It's not like it takes up much space ...\n\nWhat's it used for? Would it make more sense to have it show\nup in the commit log editor, with the list of files being checked in?\n\n-- \nMST\n"},{"id":"39573","messageId":"Pine.LNX.4.64.0704162119130.13400@beast.quantumfyre.co.uk","threadId":"7346","inReplyTo":"20070416182323.GC32515@mellanox.co.il","subject":"Re: [PATCH] remove shortlog from git-commit output","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-04-16T20:21:25Z","receivedAt":"2007-04-16T20:21:25Z","isPatch":true,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"On Mon, 16 Apr 2007, Michael S. Tsirkin wrote:\n\n>> Quoting Julian Phillips <julian@quantumfyre.co.uk>:\n>> Subject: Re: [PATCH] remove shortlog from git-commit output\n>>\n>> On Mon, 16 Apr 2007, Michael S. Tsirkin wrote:\n>>\n>>> Make git-commit only display --summary since addition/deletion\n>>> are notable events that do not happen with every commit.\n>>>\n>>> Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n>>>\n>>> ---\n>>>\n>>>>> BTW, Junio, why does git-commit need to display the diffstat?\n>>>>> You just made the commit ...\n>>>>\n>>>> Don't ask me.  It was not my idea.\n>>>>\n>>>> We only had --summary per popular list request, and it made\n>>>> certain amount of sense since addition/deletion are notable\n>>>> events that do not happen with _every_ commit.\n>>>\n>>> So how about this?\n>>>\n>>\n>> Personally I quite like the shortstat ... and certainly is/will be more\n>> useful to me than having the commit subject - despite normally having more\n>> terminals lying around than is good for my sanity.\n>>\n>> Can't we keep it? It's not like it takes up much space ...\n>\n> What's it used for? Would it make more sense to have it show\n> up in the commit log editor, with the list of files being checked in?\n>\n\nI use git add -i quite a lot, so often the same file shows up in both the \nfiles that are being committed and in the list of files that have \nuncomitted changes.  The shortstat gives me confidence that the commit was \nabout the right size.\n\n-- \nJulian\n\n  ---\nUh-oh!!  I forgot to submit to COMPULSORY URINALYSIS!\n"},{"id":"39612","messageId":"20070417060243.GB4507@mellanox.co.il","threadId":"7346","inReplyTo":"Pine.LNX.4.64.0704162119130.13400@beast.quantumfyre.co.uk","subject":"Re: [PATCH] remove shortlog from git-commit output","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-17T06:02:43Z","receivedAt":"2007-04-17T06:02:43Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Julian Phillips <julian@quantumfyre.co.uk>:\n> Subject: Re: [PATCH] remove shortlog from git-commit output\n> \n> On Mon, 16 Apr 2007, Michael S. Tsirkin wrote:\n> \n> >>Quoting Julian Phillips <julian@quantumfyre.co.uk>:\n> >>Subject: Re: [PATCH] remove shortlog from git-commit output\n> >>\n> >>On Mon, 16 Apr 2007, Michael S. Tsirkin wrote:\n> >>\n> >>>Make git-commit only display --summary since addition/deletion\n> >>>are notable events that do not happen with every commit.\n> >>>\n> >>>Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>\n> >>>\n> >>>---\n> >>>\n> >>>>>BTW, Junio, why does git-commit need to display the diffstat?\n> >>>>>You just made the commit ...\n> >>>>\n> >>>>Don't ask me.  It was not my idea.\n> >>>>\n> >>>>We only had --summary per popular list request, and it made\n> >>>>certain amount of sense since addition/deletion are notable\n> >>>>events that do not happen with _every_ commit.\n> >>>\n> >>>So how about this?\n> >>>\n> >>\n> >>Personally I quite like the shortstat ... and certainly is/will be more\n> >>useful to me than having the commit subject - despite normally having more\n> >>terminals lying around than is good for my sanity.\n> >>\n> >>Can't we keep it? It's not like it takes up much space ...\n> >\n> >What's it used for? Would it make more sense to have it show\n> >up in the commit log editor, with the list of files being checked in?\n> >\n> \n> I use git add -i quite a lot, so often the same file shows up in both the \n> files that are being committed and in the list of files that have \n> uncomitted changes.  The shortstat gives me confidence that the commit was \n> about the right size.\n\nIf so, it would make more sense to show the diffstat inside\nthe editor, where it's not too late to cancel the commit.\n\nWould it be better to show it before or after the list of files?\n\n-- \nMST\n"},{"id":"39615","messageId":"Pine.LNX.4.64.0704170823040.16002@beast.quantumfyre.co.uk","threadId":"7346","inReplyTo":"20070417060243.GB4507@mellanox.co.il","subject":"Re: [PATCH] remove shortlog from git-commit output","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-04-17T07:27:28Z","receivedAt":"2007-04-17T07:27:28Z","isPatch":true,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"On Tue, 17 Apr 2007, Michael S. Tsirkin wrote:\n\n>> I use git add -i quite a lot, so often the same file shows up in both the\n>> files that are being committed and in the list of files that have\n>> uncomitted changes.  The shortstat gives me confidence that the commit was\n>> about the right size.\n>\n> If so, it would make more sense to show the diffstat inside\n> the editor, where it's not too late to cancel the commit.\n\nIn git, it's not too late after running commit ... ;)\n\n>\n> Would it be better to show it before or after the list of files?\n\nWell, the files to be committed are listed first, and untracked files \nlast.  Next to the files to be committed would seem more sensible.\n\n-- \nJulian\n\n  ---\nMan's unique agony as a species consists in his perpetual conflict between\nthe desire to stand out and the need to blend in.\n \t\t-- Sydney J. Harris\n"}]}