{"thread":{"id":"11132","subject":"Cosmetic git-am interactive bug","startedAt":"2007-12-04T19:19:18Z","lastAt":"2007-12-05T23:58:17Z","messageCount":3,"participants":["Jeff Garzik","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"61935","messageId":"4755A836.1050408@garzik.org","threadId":"11132","inReplyTo":null,"subject":"Cosmetic git-am interactive bug","fromName":"Jeff Garzik","fromEmail":"jeff@garzik.org","sentAt":"2007-12-04T19:19:18Z","receivedAt":"2007-12-04T19:19:18Z","isPatch":false,"sender":{"key":"jeff@garzik.org","avatar":null},"body":"\nJust now, I was exploring git-am's interactive mode, so as to comply \nwith Linus's urgings of a cleaner changelog <grin>.  I had a raw email \nchangelog with the subject\n\n\tRe: 2.6.24-rc3-git6: Reported regressions from 2.6.23\n\nI used the [e]dit feature of interactive mode to change this \nfirst-line/one-line summary to\n\n\tpata_amd/pata_via: de-couple programming of PIO/MWDMA and UDMA\n\ttimings\n\nWhen I hit [y]es to apply the patch, git reported\n\n\tApplying 2.6.24-rc3-git6: Reported regressions from 2.6.23\n\n\tWrote tree 34cebd48e3b4e90fe3e6a6c6c03154ae1ed0c827\n\tCommitted: 943547abdfe9b4e27e36a25987909619908dffbf\n\nThe use of the older one-line summary led me to believe that it had not \ncommitted my changelog edits.  Looking at the result, however, proved \nthat the commit changelog was my new, corrected version.\n\nThus, I concluded that the printing of the old-and-no-longer-valid \nchangelog during the commit-to-tree phase was a bug.\n\nPlease see attached file for full example.\n\nThanks,\n\n\tJeff\n\n\n\n\n[jgarzik@pretzel libata-dev]$ git-am --utf8 --signoff -i /g/tmp/mbox \nCommit Body is:\n--------------------------\n2.6.24-rc3-git6: Reported regressions from 2.6.23\n\nOn Saturday 01 December 2007, Rafael J. Wysocki wrote:\n\n> Subject               : 2.6.24-rc1: pata_amd fails to detect 80-pin wire\n> Submitter     : \"Thomas Lindroth\" <thomas.lindroth@gmail.com>\n> References    : http://lkml.org/lkml/2007/11/7/152\n>                 http://bugzilla.kernel.org/show_bug.cgi?id=9322\n> Handled-By    : Tejun Heo <htejun@gmail.com>\n>                 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>\n> Patch         : http://lkml.org/lkml/2007/11/11/115\n\nTejun's rework of cable detection code which fixes the problem has\nbeen just applied into \"upstream\" (not \"upstream-fixes\") so it is\ndestined for 2.6.25 (I wasn't on cc: BTW) and since I got no feedback\non my patch (below) which also happens to fix the regression, was\nacked by Alan, tested by Thomas and has been in -mm for 3 weeks now\nI assume that everybody is happy with it (Jeff/Tejun: you were also\non cc: when the patch was merged into -mm)...\n\nLinus, please apply.\n\n[PATCH] pata_amd/pata_via: de-couple programming of PIO/MWDMA and UDMA timings\n\n* Don't program UDMA timings when programming PIO or MWDMA modes.\n\n  This has also a nice side-effect of fixing regression added by commit\n  681c80b5d96076f447e8101ac4325c82d8dce508 (\"libata: correct handling of\n  SRST reset sequences\") (->set_piomode method for PIO0 is called before\n  ->cable_detect method which checks UDMA timings to get the cable type).\n\n* Bump driver version.\n\nSigned-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>\nTested-by: \"Thomas Lindroth\" <thomas.lindroth@gmail.com>\nAcked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>\nCc: Jeff Garzik <jeff@garzik.org>\nCc: Tejun Heo <htejun@gmail.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>\nSigned-off-by: Jeff Garzik <jeff@garzik.org>\n--------------------------\nApply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all e\nCommit Body is:\n--------------------------\npata_amd/pata_via: de-couple programming of PIO/MWDMA and UDMA timings\n\n* Don't program UDMA timings when programming PIO or MWDMA modes.\n\n  This has also a nice side-effect of fixing regression added by commit\n  681c80b5d96076f447e8101ac4325c82d8dce508 (\"libata: correct handling of\n  SRST reset sequences\") (->set_piomode method for PIO0 is called before\n  ->cable_detect method which checks UDMA timings to get the cable type).\n\n* Bump driver version.\n\nSigned-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>\nTested-by: \"Thomas Lindroth\" <thomas.lindroth@gmail.com>\nAcked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>\nCc: Tejun Heo <htejun@gmail.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>\nSigned-off-by: Jeff Garzik <jeff@garzik.org>\n--------------------------\nApply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all y\n\nApplying 2.6.24-rc3-git6: Reported regressions from 2.6.23\n\nWrote tree 34cebd48e3b4e90fe3e6a6c6c03154ae1ed0c827\nCommitted: 943547abdfe9b4e27e36a25987909619908dffbf\n\n"},{"id":"61976","messageId":"7v8x491v79.fsf@gitster.siamese.dyndns.org","threadId":"11132","inReplyTo":"4755A836.1050408@garzik.org","subject":"Re: Cosmetic git-am interactive bug","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-05T07:01:30Z","receivedAt":"2007-12-05T07:01:30Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff Garzik <jeff@garzik.org> writes:\n\n> The use of the older one-line summary led me to believe that it had\n> not committed my changelog edits.  Looking at the result, however,\n> proved that the commit changelog was my new, corrected version.\n\nI knew about this for quite some time but it was a very low priority for\nme.  This should fix it.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\ndiff --git a/git-am.sh b/git-am.sh\nindex 2e40708..339d863 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -117,6 +117,10 @@ It does not apply to blobs recorded in its index.\"\n     unset GITHEAD_$his_tree\n }\n \n+reread_subject () {\n+\tgit stripspace <\"$1\" | sed -e 1q\n+}\n+\n prec=4\n dotest=.dotest sign= utf8=t keep= skip= interactive= resolved= binary=\n resolvemsg= resume=\n@@ -376,6 +380,7 @@ do\n \t\t[aA]*) action=yes interactive= ;;\n \t\t[nN]*) action=skip ;;\n \t\t[eE]*) git_editor \"$dotest/final-commit\"\n+\t\t       SUBJECT=$(reread_subject \"$dotest/final-commit\")\n \t\t       action=again ;;\n \t\t[vV]*) action=again\n \t\t       LESS=-S ${PAGER:-less} \"$dotest/patch\" ;;\n"},{"id":"62074","messageId":"47573B19.40502@garzik.org","threadId":"11132","inReplyTo":"7v8x491v79.fsf@gitster.siamese.dyndns.org","subject":"Re: Cosmetic git-am interactive bug","fromName":"Jeff Garzik","fromEmail":"jeff@garzik.org","sentAt":"2007-12-05T23:58:17Z","receivedAt":"2007-12-05T23:58:17Z","isPatch":false,"sender":{"key":"jeff@garzik.org","avatar":null},"body":"Junio C Hamano wrote:\n> Jeff Garzik <jeff@garzik.org> writes:\n> \n>> The use of the older one-line summary led me to believe that it had\n>> not committed my changelog edits.  Looking at the result, however,\n>> proved that the commit changelog was my new, corrected version.\n> \n> I knew about this for quite some time but it was a very low priority for\n> me.  This should fix it.\n> \n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\nThanks!  :)\n"}]}