{"thread":{"id":"17168","subject":"What's cooking in git.git (Jan 2009, #03; Wed, 14)","startedAt":"2009-01-14T11:32:32Z","lastAt":"2009-01-21T20:30:48Z","messageCount":11,"participants":["Junio C Hamano","Kirill Smelkov","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"100396","messageId":"7vmydu3yy7.fsf@gitster.siamese.dyndns.org","threadId":"17168","inReplyTo":null,"subject":"What's cooking in git.git (Jan 2009, #03; Wed, 14)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-14T11:32:32Z","receivedAt":"2009-01-14T11:32:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Here are the topics that have been cooking.  Commits prefixed\nwith '-' are only in 'pu' while commits prefixed with '+' are\nin 'next'.  The ones marked with '.' do not appear in any of\nthe branches, but I am still holding onto them.\n\nThe topics list the commits in reverse chronological order.  The\ntopics meant to be merged to the maintenance series have \"maint-\"\nin their names.\n\n----------------------------------------------------------------\n[New Topics]\n\n* kb/am-directory (Sun Jan 11 22:21:48 2009 -0800) 1 commit\n + git-am: add --directory=<dir> option\n\nThis is \"third-time-lucky, perhaps?\" resurrection.  I do not think I'd be\nusing this very often, but it originated from a real user request.\n\n* jk/signal-cleanup (Sun Jan 11 06:36:49 2009 -0500) 3 commits\n - pager: do wait_for_pager on signal death\n - refactor signal handling for cleanup functions\n - chain kill signals for cleanup functions\n\n* kb/lstat-cache (Tue Jan 13 13:29:08 2009 +0100) 5 commits\n - lstat_cache(): introduce clear_lstat_cache() function\n - lstat_cache(): introduce invalidate_lstat_cache() function\n - lstat_cache(): introduce has_dirs_only_path() function\n - lstat_cache(): introduce has_symlink_or_noent_leading_path()\n   function\n - lstat_cache(): more cache effective symlink/directory detection\n\nThis is the seventh round; although the author asked me not to bother, I\ncouldn't resist.  I renamed one helper function while reading the patches\nand made minor adjustments on styles, but it looked reasonable.\n\n* lh/submodule-tree-traversal (Mon Jan 12 00:45:55 2009 +0100) 3 commits\n - builtin-ls-tree: enable traversal of submodules\n - archive.c: enable traversal of submodules\n - tree.c: add support for traversal of submodules\n\n* jc/maint-format-patch-o-relative (Mon Jan 12 15:18:02 2009 -0800) 1 commit\n - Teach format-patch to handle output directory relative to cwd\n\nThis was my lunchtime \"this may fix it\" response to a breakage report.  I\nhaven't really thought things through but my gut feeling is this might\nbreak things for minorities who are accustomed to the existing behaviour,\nespecially wrt the filenames reported on the standard output.\n\n* lt/maint-wrap-zlib (Wed Jan 7 19:54:47 2009 -0800) 1 commit\n + Wrap inflate and other zlib routines for better error reporting\n\nNeeds the \"free our memory upon seeing Z_MEM_ERROR and try again\" bits\nextracted from Shawn's patch on top of this one.\n\n* js/diff-color-words (Sun Jan 11 21:00:58 2009 +0100) 4 commits\n - color-words: take an optional regular expression describing words\n - color-words: refactor to allow for 0-character word boundaries\n - color-words: refactor word splitting and use ALLOC_GROW()\n - Add color_fwrite(), a function coloring each line individually\n\nDscho's series that was done in response to Thomas's original; two agreed\nto work together on this codebase.\n\n* db/foreign-scm (Sun Jan 11 15:12:10 2009 -0500) 3 commits\n - Support fetching from foreign VCSes\n - Add specification of git-vcs helpers\n - Add \"vcs\" config option in remotes\n\n----------------------------------------------------------------\n[Stalled and may need help and prodding to go forward]\n\n* ds/uintmax-config (Mon Nov 3 09:14:28 2008 -0900) 1 commit\n . autoconf: Enable threaded delta search when pthreads are supported\n\nI haven't heard neither positive nor negative comments from minority\nplatforms that might be harmed, but this feels like the right thing to do,\nso perhaps the best course of action is to merge this down to 'master' and\nsee if anybody screams.\n\n* jc/blame (Wed Jun 4 22:58:40 2008 -0700) 2 commits\n + blame: show \"previous\" information in --porcelain/--incremental\n   format\n + git-blame: refactor code to emit \"porcelain format\" output\n\nThis gives Porcelains (like gitweb) the information on the commit _before_\nthe one that the final blame is laid on, which should save them one\nrev-parse to dig further.  The line number in the \"previous\" information\nmay need refining, and sanity checking code for reference counting may\nneed to be resurrected before this can move forward.\n\n----------------------------------------------------------------\n[Actively cooking]\n\n* gb/gitweb-opml (Fri Jan 2 13:49:30 2009 +0100) 2 commits\n + gitweb: suggest name for OPML view\n + gitweb: don't use pathinfo for global actions\n\n* ks/maint-mailinfo-folded (Mon Jan 12 15:22:11 2009 -0800) 2 commits\n - mailinfo: 'From:' header should be unfold as well\n - mailinfo: correctly handle multiline 'Subject:' header\n\nThe author seems to have more updates, but I couldn't extract them from\nthe e-mail.\n\n* js/patience-diff (Thu Jan 1 17:39:37 2009 +0100) 3 commits\n + bash completions: Add the --patience option\n + Introduce the diff option '--patience'\n + Implement the patience diff algorithm\n\n* mv/apply-parse-opt (Fri Jan 9 22:21:36 2009 -0800) 2 commits\n + Resurrect \"git apply --flags -\" to read from the standard input\n + parse-opt: migrate builtin-apply.\n\n* tr/rebase-root (Fri Jan 2 23:28:29 2009 +0100) 4 commits\n + rebase: update documentation for --root\n + rebase -i: learn to rebase root commit\n + rebase: learn to rebase root commit\n + rebase -i: execute hook only after argument checking\n\nLooked reasonable.\n\n* js/notes (Tue Jan 13 20:57:16 2009 +0100) 6 commits\n + git-notes: fix printing of multi-line notes\n + notes: fix core.notesRef documentation\n + Add an expensive test for git-notes\n + Speed up git notes lookup\n + Add a script to edit/inspect notes\n + Introduce commit notes\n\n* sc/gitweb-category (Fri Dec 12 00:45:12 2008 +0100) 3 commits\n - gitweb: Optional grouping of projects by category\n - gitweb: Split git_project_list_body in two functions\n - gitweb: Modularized git_get_project_description to be more generic\n\n----------------------------------------------------------------\n[Graduated to \"master\"]\n\n* nd/grep-assume-unchanged (Sat Dec 27 15:21:03 2008 +0700) 2 commits\n + grep: grep cache entries if they are \"assume unchanged\"\n + grep: support --no-ext-grep to test builtin grep\n\n* as/maint-shortlog-cleanup (Tue Dec 30 22:01:44 2008 +0100) 1 commit\n + builtin-shortlog.c: use string_list_append(), and don't strdup\n   unnecessarily\n\n* jc/maint-ls-tree (Wed Dec 31 19:00:50 2008 +0900) 2 commits\n + Document git-ls-tree --full-tree\n + ls-tree: add --full-tree option\n\n* js/bundle-tags (Fri Jan 2 19:08:46 2009 +0100) 1 commit\n + bundle: allow rev-list options to exclude annotated tags\n\n* js/add-not-submodule (Fri Jan 2 19:08:40 2009 +0100) 1 commit\n + git add: do not add files from a submodule\n\n* pb/maint-git-pm-false-dir (Mon Dec 29 01:25:00 2008 +0100) 1 commit\n + Git.pm: correctly handle directory name that evaluates to \"false\"\n\n* pj/maint-ldflags (Sun Jan 4 21:27:41 2009 -0500) 1 commit\n + configure clobbers LDFLAGS\n\n* fe/cvsserver (Fri Jan 2 16:40:14 2009 +0100) 2 commits\n + cvsserver: change generation of CVS author names\n + cvsserver: add option to configure commit message\n\n* js/maint-bisect-gitk (Fri Jan 2 19:08:00 2009 +0100) 1 commit\n + bisect view: call gitk if Cygwin's SESSIONNAME variable is set\n\n* np/no-loosen-prune-expire-now (Tue Dec 30 14:45:11 2008 -0500) 1 commit\n + objects to be pruned immediately don't have to be loosened\n\n* cb/maint-unpack-trees-absense (Thu Jan 1 21:54:33 2009 +0100) 3 commits\n + unpack-trees: remove redundant path search in verify_absent\n + unpack-trees: fix path search bug in verify_absent\n + unpack-trees: handle failure in verify_absent\n\n* mc/cd-p-pwd (Tue Dec 30 07:10:24 2008 -0800) 1 commit\n + git-sh-setup: Fix scripts whose PWD is a symlink to a work-dir on\n   OS X\n\n* mh/cherry-default (Thu Jan 1 22:56:29 2009 +0100) 2 commits\n + Documentation: clarify which parameters are optional to git-cherry\n + git-cherry: make <upstream> parameter optional\n\nSome of the above will still need to be downmerged to respective\nmaintenance branches after they are widely used on 'master'.\n\n----------------------------------------------------------------\n[Will merge to \"master\" soon]\n\n* mh/maint-commit-color-status (Thu Jan 8 19:53:05 2009 +0100) 2 commits\n + git-status -v: color diff output when color.ui is set\n + git-commit: color status output when color.ui is set\n\n* rs/maint-shortlog-foldline (Tue Jan 6 21:41:06 2009 +0100) 1 commit\n + shortlog: handle multi-line subjects like log --pretty=oneline et.\n   al. do\n\n* rs/fgrep (Sat Jan 10 00:18:34 2009 +0100) 2 commits\n + grep: don't call regexec() for fixed strings\n + grep -w: forward to next possible position after rejected match\n\n* as/autocorrect-alias (Sun Jan 4 18:16:01 2009 +0100) 1 commit\n + git.c: make autocorrected aliases work\n\n* tr/maint-no-index-fixes (Wed Jan 7 12:15:30 2009 +0100) 3 commits\n + diff --no-index -q: fix endless loop\n + diff --no-index: test for pager after option parsing\n + diff: accept -- when using --no-index\n\n* jc/maint-format-patch (Sat Jan 10 12:41:33 2009 -0800) 1 commit\n + format-patch: show patch text for the root commit\n\n* ap/clone-into-empty (Sun Jan 11 15:19:12 2009 +0300) 2 commits\n + Allow cloning to an existing empty directory\n + add is_dot_or_dotdot inline function\n\n* gb/gitweb-patch (Thu Dec 18 08:13:19 2008 +0100) 4 commits\n + gitweb: link to patch(es) view in commit(diff) and (short)log view\n + gitweb: add patches view\n + gitweb: change call pattern for git_commitdiff\n + gitweb: add patch view\n\n----------------------------------------------------------------\n[On Hold]\n\n* jk/renamelimit (Sat May 3 13:58:42 2008 -0700) 1 commit\n . diff: enable \"too large a rename\" warning when -M/-C is explicitly\n   asked for\n\n* jc/stripspace (Sun Mar 9 00:30:35 2008 -0800) 6 commits\n . git-am --forge: add Signed-off-by: line for the author\n . git-am: clean-up Signed-off-by: lines\n . stripspace: add --log-clean option to clean up signed-off-by:\n   lines\n . stripspace: use parse_options()\n . Add \"git am -s\" test\n . git-am: refactor code to add signed-off-by line for the committer\n"},{"id":"100649","messageId":"20090115194926.GA6899@roro3.zxlink","threadId":"17168","inReplyTo":"7vmydu3yy7.fsf@gitster.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Jan 2009, #03; Wed, 14)","fromName":"Kirill Smelkov","fromEmail":"kirr@landau.phys.spbu.ru","sentAt":"2009-01-15T19:49:26Z","receivedAt":"2009-01-15T19:49:26Z","isPatch":false,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"On Wed, Jan 14, 2009 at 03:32:32AM -0800, Junio C Hamano wrote:\n\n[...]\n\n> [Actively cooking]\n> \n> * gb/gitweb-opml (Fri Jan 2 13:49:30 2009 +0100) 2 commits\n>  + gitweb: suggest name for OPML view\n>  + gitweb: don't use pathinfo for global actions\n> \n> * ks/maint-mailinfo-folded (Mon Jan 12 15:22:11 2009 -0800) 2 commits\n>  - mailinfo: 'From:' header should be unfold as well\n>  - mailinfo: correctly handle multiline 'Subject:' header\n> \n> The author seems to have more updates, but I couldn't extract them from\n> the e-mail.\n\nSorry for the inconvenience, and please pull them all from\n\n    git://repo.or.cz/git/kirr.git   for-junio\n\n\nKirill Smelkov (4):\n      mailinfo: 'From:' header should be unfold as well\n      mailinfo: more smarter removal of rfc822 comments from 'From'\n      mailinfo: correctly handle multiline 'Subject:' header\n      mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'\n\n\nThanks,\nKirill\n"},{"id":"100654","messageId":"7vd4eos3rp.fsf@gitster.siamese.dyndns.org","threadId":"17168","inReplyTo":"20090115194926.GA6899@roro3.zxlink","subject":"Re: What's cooking in git.git (Jan 2009, #03; Wed, 14)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-15T20:39:06Z","receivedAt":"2009-01-15T20:39:06Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Kirill Smelkov <kirr@landau.phys.spbu.ru> writes:\n\n> Sorry for the inconvenience, and please pull them all from\n>\n>     git://repo.or.cz/git/kirr.git   for-junio\n>\n> Kirill Smelkov (4):\n>       mailinfo: 'From:' header should be unfold as well\n>       mailinfo: more smarter removal of rfc822 comments from 'From'\n>       mailinfo: correctly handle multiline 'Subject:' header\n>       mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'\n\nSorry, but I cannot _pull_ this one; not because these four patches are\nbad (I haven't looked at them).\n\nThey include all the other totally unrelated stuff that happend on the\nmaster branch since the topic ks/maint-mailinfo-folded forked.  I've been\nhoping upon completion of this topic we can merge it down to maint to\npropagate the fix back to v1.6.1.X series.\n\nWith this alias:\n\n$ git config alias.lg log --pretty=oneline --abbrev-commit --boundary --left-right\n\nHere are what I have queued so far (and they are in next):\n\n$ git lg master..ks/maint-mailinfo-folded\n>ddfb369... mailinfo: 'From:' header should be unfold as well\n>353aaf2... mailinfo: correctly handle multiline 'Subject:' header\n-141201d... Merge branch 'maint-1.5.6' into maint-1.6.0\n\n$ git lg maint..ks/maint-mailinfo-folded\n>ddfb369... mailinfo: 'From:' header should be unfold as well\n>353aaf2... mailinfo: correctly handle multiline 'Subject:' header\n-141201d... Merge branch 'maint-1.5.6' into maint-1.6.0\n\n141201d is only three commits ahead of v1.6.0.6 and\n\n$ git lg v1.6.0.6..141201d\n\nwill show that we _could_ even issue v1.6.0.7 with the fixes in this topic\nif we cared about this bug deeply enough.  If I pull the above to the\ntopic, we'll lose the ability to propagate these fixes to the maintenance\nserires.\n\nSo please either say \"Yes, you are welcome to cherry-pick -- fetching and\ncherry-picking would be easier than e-mail for this kind of patch\", or\n\"Ok, I'll rebase my series on top of ddfb369\".\n\nWell, I just noticed that some of your commits already conflict with the\ntwo patches that I already have, so I guess we would need at least one\nrebase anyway, so this time around, I'd really prefer you not to say \"you\nare welcome to cherry-pick\" ;-)\n\nThanks.\n"},{"id":"100704","messageId":"20090116080807.GA10792@landau.phys.spbu.ru","threadId":"17168","inReplyTo":"7vd4eos3rp.fsf@gitster.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Jan 2009, #03; Wed, 14)","fromName":"Kirill Smelkov","fromEmail":"kirr@landau.phys.spbu.ru","sentAt":"2009-01-16T08:08:08Z","receivedAt":"2009-01-16T08:08:08Z","isPatch":false,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"On Thu, Jan 15, 2009 at 12:39:06PM -0800, Junio C Hamano wrote:\n> Kirill Smelkov <kirr@landau.phys.spbu.ru> writes:\n> \n> > Sorry for the inconvenience, and please pull them all from\n> >\n> >     git://repo.or.cz/git/kirr.git   for-junio\n> >\n> > Kirill Smelkov (4):\n> >       mailinfo: 'From:' header should be unfold as well\n> >       mailinfo: more smarter removal of rfc822 comments from 'From'\n> >       mailinfo: correctly handle multiline 'Subject:' header\n> >       mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'\n> \n> Sorry, but I cannot _pull_ this one; not because these four patches are\n> bad (I haven't looked at them).\n> \n> They include all the other totally unrelated stuff that happend on the\n> master branch since the topic ks/maint-mailinfo-folded forked.  I've been\n> hoping upon completion of this topic we can merge it down to maint to\n> propagate the fix back to v1.6.1.X series.\n> \n> With this alias:\n> \n> $ git config alias.lg log --pretty=oneline --abbrev-commit --boundary --left-right\n> \n> Here are what I have queued so far (and they are in next):\n> \n> $ git lg master..ks/maint-mailinfo-folded\n> >ddfb369... mailinfo: 'From:' header should be unfold as well\n> >353aaf2... mailinfo: correctly handle multiline 'Subject:' header\n> -141201d... Merge branch 'maint-1.5.6' into maint-1.6.0\n> \n> $ git lg maint..ks/maint-mailinfo-folded\n> >ddfb369... mailinfo: 'From:' header should be unfold as well\n> >353aaf2... mailinfo: correctly handle multiline 'Subject:' header\n> -141201d... Merge branch 'maint-1.5.6' into maint-1.6.0\n> \n> 141201d is only three commits ahead of v1.6.0.6 and\n> \n> $ git lg v1.6.0.6..141201d\n> \n> will show that we _could_ even issue v1.6.0.7 with the fixes in this topic\n> if we cared about this bug deeply enough.  If I pull the above to the\n> topic, we'll lose the ability to propagate these fixes to the maintenance\n> serires.\n> \n> So please either say \"Yes, you are welcome to cherry-pick -- fetching and\n> cherry-picking would be easier than e-mail for this kind of patch\", or\n> \"Ok, I'll rebase my series on top of ddfb369\".\n> \n> Well, I just noticed that some of your commits already conflict with the\n> two patches that I already have, so I guess we would need at least one\n> rebase anyway, so this time around, I'd really prefer you not to say \"you\n> are welcome to cherry-pick\" ;-)\n\nSure, I've rebased my series on top of ddfb369 :)\n\n    git://repo.or.cz/git/kirr.git   for-junio-maint\n\n\nKirill Smelkov (3):\n      mailinfo: more smarter removal of rfc822 comments from 'From'\n      mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'\n      mailinfo: tests for RFC2047 examples\n\n\nThanks,\nKirill\n"},{"id":"100705","messageId":"7vd4enacf2.fsf@gitster.siamese.dyndns.org","threadId":"17168","inReplyTo":"20090116080807.GA10792@landau.phys.spbu.ru","subject":"Re: What's cooking in git.git (Jan 2009, #03; Wed, 14)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-16T08:21:53Z","receivedAt":"2009-01-16T08:21:53Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Kirill Smelkov <kirr@landau.phys.spbu.ru> writes:\n\n> On Thu, Jan 15, 2009 at 12:39:06PM -0800, Junio C Hamano wrote:\n> ...\n>> So please either say \"Yes, you are welcome to cherry-pick -- fetching and\n>> cherry-picking would be easier than e-mail for this kind of patch\", or\n>> \"Ok, I'll rebase my series on top of ddfb369\".\n>> \n>> Well, I just noticed that some of your commits already conflict with the\n>> two patches that I already have, so I guess we would need at least one\n>> rebase anyway, so this time around, I'd really prefer you not to say \"you\n>> are welcome to cherry-pick\" ;-)\n>\n> Sure, I've rebased my series on top of ddfb369 :)\n>\n>     git://repo.or.cz/git/kirr.git   for-junio-maint\n>\n>\n> Kirill Smelkov (3):\n>       mailinfo: more smarter removal of rfc822 comments from 'From'\n>       mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'\n>       mailinfo: tests for RFC2047 examples\n\nThanks.\n\nI thought there is somebody on this list who insists his name is of form:\n\n\tFrom: A U Thor (MonikeR) <a.u@thor.xz>\n\nand vaguely recall the current code was tweaked to keep that extra moniker\nin his (or her?) name.  It is too late at night for me to double check but\nI suspect the first one in the series may break things for that kind of\nnames.\n"},{"id":"100720","messageId":"alpine.DEB.1.00.0901161253411.3586@pacific.mpi-cbg.de","threadId":"17168","inReplyTo":"7vd4enacf2.fsf@gitster.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Jan 2009, #03; Wed, 14)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-16T11:54:28Z","receivedAt":"2009-01-16T11:54:28Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 16 Jan 2009, Junio C Hamano wrote:\n\n> I thought there is somebody on this list who insists his name is of form:\n> \n> \tFrom: A U Thor (MonikeR) <a.u@thor.xz>\n\nIt is Philippe Bruhat (BooK), who sometimes forgets the closing \nparenthesis, and who is listed in .mailmap without the moniker.\n\nCiao,\nDscho\n"},{"id":"100980","messageId":"20090118145429.GA27522@roro3.zxlink","threadId":"17168","inReplyTo":"alpine.DEB.1.00.0901161253411.3586@pacific.mpi-cbg.de","subject":"Re: What's cooking in git.git (Jan 2009, #03; Wed, 14)","fromName":"Kirill Smelkov","fromEmail":"kirr@landau.phys.spbu.ru","sentAt":"2009-01-18T14:54:29Z","receivedAt":"2009-01-18T14:54:29Z","isPatch":false,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"On Fri, Jan 16, 2009 at 12:54:28PM +0100, Johannes Schindelin wrote:\n> Hi,\n> \n> On Fri, 16 Jan 2009, Junio C Hamano wrote:\n> \n> > I thought there is somebody on this list who insists his name is of form:\n> > \n> > \tFrom: A U Thor (MonikeR) <a.u@thor.xz>\n> \n> It is Philippe Bruhat (BooK), who sometimes forgets the closing \n> parenthesis, and who is listed in .mailmap without the moniker.\n\nSo now I don't understand what to do.\n\n>From one hand RFC822 says '(...)' is a comment, and from the other hand,\nwe have a use case where one guy wants this to stay.\n\nFor the record, here is the questionable patch. Any suggestion?\n\nThanks,\nKirill\n\n\ncommit 49bebfbe18dac296e5e246884bd98c1f90be9676\nAuthor: Kirill Smelkov <kirr@landau.phys.spbu.ru>\nDate:   Tue Jan 13 01:21:04 2009 +0300\n\n    mailinfo: more smarter removal of rfc822 comments from 'From'\n    \n    As described in RFC822 (3.4.3 COMMENTS, and  A.1.4.), comments, as e.g.\n    \n        John (zzz) Doe <john.doe@xz> (Comment)\n    \n    should \"NOT [be] included in the destination mailbox\"\n    \n    We need this functionality to pass all RFC2047 based tests in the next commit.\n    \n    Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>\n\ndiff --git a/builtin-mailinfo.c b/builtin-mailinfo.c\nindex dacc8ac..958c905 100644\n--- a/builtin-mailinfo.c\n+++ b/builtin-mailinfo.c\n@@ -29,6 +29,9 @@ static struct strbuf **p_hdr_data, **s_hdr_data;\n #define MAX_HDR_PARSED 10\n #define MAX_BOUNDARIES 5\n \n+static void cleanup_space(struct strbuf *sb);\n+\n+\n static void get_sane_name(struct strbuf *out, struct strbuf *name, struct strbuf *email)\n {\n \tstruct strbuf *src = name;\n@@ -120,6 +123,33 @@ static void handle_from(const struct strbuf *from)\n \t\tstrbuf_setlen(&f, f.len - 1);\n \t}\n \n+\t/* This still could not be finished for emails like\n+\t *\n+\t *\t\"John (zzz) Doe <john.doe@xz> (Comment)\"\n+\t *\n+\t * The email part had already been removed, so let's kill comments as\n+\t * well -- RFC822 says comments should not be present in destination\n+\t * mailbox (3.4.3. Comments  and  A.1.4.)\n+\t */\n+\twhile (1) {\n+\t\tchar *ta;\n+\n+\t\tat = strchr(f.buf, '(');\n+\t\tif (!at)\n+\t\t\tbreak;\n+\t\tta = strchr(at, ')');\n+\t\tif (!ta)\n+\t\t\tbreak;\n+\n+\t\tstrbuf_remove(&f, at - f.buf, ta-at + (*ta ? 1 : 0));\n+\t}\n+\n+\t/* and let's finally cleanup spaces that were around (possibly\n+\t * internal) comments\n+\t */\n+\tcleanup_space(&f);\n+\tstrbuf_trim(&f);\n+\n \tget_sane_name(&name, &f, &email);\n \tstrbuf_release(&f);\n }\ndiff --git a/t/t5100/sample.mbox b/t/t5100/sample.mbox\nindex 38725f3..4f80b82 100644\n--- a/t/t5100/sample.mbox\n+++ b/t/t5100/sample.mbox\n@@ -2,10 +2,10 @@\n \t\n     \n From nobody Mon Sep 17 00:00:00 2001\n-From: A\n+From: A (zzz)\n       U\n       Thor\n-      <a.u.thor@example.com>\n+      <a.u.thor@example.com> (Comment)\n Date: Fri, 9 Jun 2006 00:44:16 -0700\n Subject: [PATCH] a commit.\n \n"},{"id":"101034","messageId":"7vmydoxxcr.fsf_-_@gitster.siamese.dyndns.org","threadId":"17168","inReplyTo":"20090118145429.GA27522@roro3.zxlink","subject":"John (zzz) Doe <john.doe@xz> (Comment)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-18T18:50:12Z","receivedAt":"2009-01-18T18:50:12Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Kirill Smelkov <kirr@landau.phys.spbu.ru> writes:\n\n> On Fri, Jan 16, 2009 at 12:54:28PM +0100, Johannes Schindelin wrote:\n> ...\n>> > \tFrom: A U Thor (MonikeR) <a.u@thor.xz>\n>> \n>> It is Philippe Bruhat (BooK), who sometimes forgets the closing \n>> parenthesis, and who is listed in .mailmap without the moniker.\n\nIt was not \"forgets\", but is an artifact that older mailinfo removed\nparenthesis incorrectly (see below).\n\n> So now I don't understand what to do.\n>\n> From one hand RFC822 says '(...)' is a comment, and from the other hand,\n> we have a use case where one guy wants this to stay.\n> ...\n> commit 49bebfbe18dac296e5e246884bd98c1f90be9676\n> Author: Kirill Smelkov <kirr@landau.phys.spbu.ru>\n> Date:   Tue Jan 13 01:21:04 2009 +0300\n>\n>     mailinfo: more smarter removal of rfc822 comments from 'From'\n>     \n>     As described in RFC822 (3.4.3 COMMENTS, and  A.1.4.), comments, as e.g.\n>     \n>         John (zzz) Doe <john.doe@xz> (Comment)\n>     \n>     should \"NOT [be] included in the destination mailbox\"\n\nThe above quote from the RFC is irrelevant.  Note that it is only about\nhow you extract the e-mail address, discarding everything else.\n\nWhat mailinfo wants to do is to separate the human-readable name and the\ne-mail address, and we want to use _both_ results from it.\n\nWe separate a few example From: lines like this:\n\n\tKirill Smelkov <kirr@smelkov.xz>\n==>\tAUTHOR_EMAIL=\"kirr@smelkov.xz\" AUTHOR_NAME=\"Kirill Smelkov\"\n\n\tkirr@smelkov.xz (Kirill Smelkov)\n==>\tAUTHOR_EMAIL=\"kirr@smelkov.xz\" AUTHOR_NAME=\"Kirill Smelkov\"\n\nTraditionally, the way people spelled their name on From: line has been\neither one of the above form.  Typically comment form (i.e. the second\none) adds the name at the end, while \"Name <addr>\" form has the name at\nthe front.  But I do not think RFC requires that, primarily because it is\nall about discarding non-address part to find the e-mail address aka\n\"destination mailbox\".  It does not specify how humans should interpret\nthe human readable name and the comment.\n\nNow, why is the name not AUTHOR_NAME=\"(Kirill Smelkov)\" in the latter\nform?\n\nIt is just common sense transformation.  Otherwise it looks simply ugly,\nand it is obvious that the parentheses is not part of the name of the\nperson who used \"kirr@smelkov.xz (Kirill Smelkov)\" on his From: line.\n\nSo we can separate \"John (zzz) Doe <john.doe@xz> (Comment)\" into:\n\n\tAUTHOR_EMAIL=john.doe@xz\n        AUTHOR_NAME=\"John (zzz) Doe (Comment)\"\n\nand leave it like so, I think.\n"},{"id":"101286","messageId":"20090120191446.GB5721@roro3.zxlink","threadId":"17168","inReplyTo":"7vmydoxxcr.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: John (zzz) Doe <john.doe@xz> (Comment)","fromName":"Kirill Smelkov","fromEmail":"kirr@landau.phys.spbu.ru","sentAt":"2009-01-20T19:14:46Z","receivedAt":"2009-01-20T19:14:46Z","isPatch":false,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"On Sun, Jan 18, 2009 at 10:50:12AM -0800, Junio C Hamano wrote:\n> So we can separate \"John (zzz) Doe <john.doe@xz> (Comment)\" into:\n> \n> \tAUTHOR_EMAIL=john.doe@xz\n>         AUTHOR_NAME=\"John (zzz) Doe (Comment)\"\n> \n> and leave it like so, I think.\n\nOk, here you are:\n\nSubject: [PATCH 1/3] mailinfo: cleanup extra spaces for complex 'From'\n\nAs described in RFC822 (3.4.3 COMMENTS, and  A.1.4.), comments, as e.g.\n\n    John (zzz) Doe <john.doe@xz> (Comment)\n\nshould \"NOT [be] included in the destination mailbox\"\n\nOn the other hand, quoting Junio:\n\n> The above quote from the RFC is irrelevant.  Note that it is only about\n> how you extract the e-mail address, discarding everything else.\n>\n> What mailinfo wants to do is to separate the human-readable name and the\n> e-mail address, and we want to use _both_ results from it.\n>\n> We separate a few example From: lines like this:\n>\n> \tKirill Smelkov <kirr@smelkov.xz>\n> ==>\tAUTHOR_EMAIL=\"kirr@smelkov.xz\" AUTHOR_NAME=\"Kirill Smelkov\"\n>\n> \tkirr@smelkov.xz (Kirill Smelkov)\n> ==>\tAUTHOR_EMAIL=\"kirr@smelkov.xz\" AUTHOR_NAME=\"Kirill Smelkov\"\n>\n> Traditionally, the way people spelled their name on From: line has been\n> either one of the above form.  Typically comment form (i.e. the second\n> one) adds the name at the end, while \"Name <addr>\" form has the name at\n> the front.  But I do not think RFC requires that, primarily because it is\n> all about discarding non-address part to find the e-mail address aka\n> \"destination mailbox\".  It does not specify how humans should interpret\n> the human readable name and the comment.\n>\n> Now, why is the name not AUTHOR_NAME=\"(Kirill Smelkov)\" in the latter\n> form?\n>\n> It is just common sense transformation.  Otherwise it looks simply ugly,\n> and it is obvious that the parentheses is not part of the name of the\n> person who used \"kirr@smelkov.xz (Kirill Smelkov)\" on his From: line.\n>\n> So we can separate \"John (zzz) Doe <john.doe@xz> (Comment)\" into:\n>\n> \tAUTHOR_EMAIL=john.doe@xz\n>         AUTHOR_NAME=\"John (zzz) Doe (Comment)\"\n>\n> and leave it like so, I think.\n\nSo let's just correctly remove extra spaces which could be left inside\nname.\n\nWe need this functionality to pass all RFC2047 based tests in the next commit.\n\nSigned-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>\n---\n builtin-mailinfo.c  |   21 +++++++++++++++++----\n t/t5100/info0001    |    2 +-\n t/t5100/sample.mbox |    4 ++--\n 3 files changed, 20 insertions(+), 7 deletions(-)\n\ndiff --git a/builtin-mailinfo.c b/builtin-mailinfo.c\nindex dacc8ac..8030823 100644\n--- a/builtin-mailinfo.c\n+++ b/builtin-mailinfo.c\n@@ -29,6 +29,9 @@ static struct strbuf **p_hdr_data, **s_hdr_data;\n #define MAX_HDR_PARSED 10\n #define MAX_BOUNDARIES 5\n \n+static void cleanup_space(struct strbuf *sb);\n+\n+\n static void get_sane_name(struct strbuf *out, struct strbuf *name, struct strbuf *email)\n {\n \tstruct strbuf *src = name;\n@@ -109,10 +112,14 @@ static void handle_from(const struct strbuf *from)\n \tstrbuf_add(&email, at, el);\n \tstrbuf_remove(&f, at - f.buf, el + (at[el] ? 1 : 0));\n \n-\t/* The remainder is name.  It could be \"John Doe <john.doe@xz>\"\n-\t * or \"john.doe@xz (John Doe)\", but we have removed the\n-\t * email part, so trim from both ends, possibly removing\n-\t * the () pair at the end.\n+\t/* The remainder is name.  It could be\n+\t *\n+\t * - \"John Doe <john.doe@xz>\"\t\t\t(a), or\n+\t * - \"john.doe@xz (John Doe)\"\t\t\t(b), or\n+\t * - \"John (zzz) Doe <john.doe@xz> (Comment)\"\t(c)\n+\t *\n+\t * but we have removed the email part, so trim from both ends, possibly\n+\t * removing the () pair at the end for case 'b'.\n \t */\n \tstrbuf_trim(&f);\n \tif (f.buf[0] == '(' && f.len && f.buf[f.len - 1] == ')') {\n@@ -120,6 +127,12 @@ static void handle_from(const struct strbuf *from)\n \t\tstrbuf_setlen(&f, f.len - 1);\n \t}\n \n+\t/* Otherwise we want comments to stay. It's just time to cleanup extra\n+\t * spaces\n+\t */\n+\tcleanup_space(&f);\n+\tstrbuf_trim(&f);\n+\n \tget_sane_name(&name, &f, &email);\n \tstrbuf_release(&f);\n }\ndiff --git a/t/t5100/info0001 b/t/t5100/info0001\nindex 8c05277..f951538 100644\n--- a/t/t5100/info0001\n+++ b/t/t5100/info0001\n@@ -1,4 +1,4 @@\n-Author: A U Thor\n+Author: A (zzz) U Thor (Comment)\n Email: a.u.thor@example.com\n Subject: a commit.\n Date: Fri, 9 Jun 2006 00:44:16 -0700\ndiff --git a/t/t5100/sample.mbox b/t/t5100/sample.mbox\nindex 38725f3..4f80b82 100644\n--- a/t/t5100/sample.mbox\n+++ b/t/t5100/sample.mbox\n@@ -2,10 +2,10 @@\n \t\n     \n From nobody Mon Sep 17 00:00:00 2001\n-From: A\n+From: A (zzz)\n       U\n       Thor\n-      <a.u.thor@example.com>\n+      <a.u.thor@example.com> (Comment)\n Date: Fri, 9 Jun 2006 00:44:16 -0700\n Subject: [PATCH] a commit.\n \n-- \n1.6.1.79.g92b9.dirty\n\n\nIs it ok?\n\nAnd by the way, please pull the whole updated series from\n\n    git://repo.or.cz/git/kirr.git   for-junio-maint\n\nKirill Smelkov (3):\n      mailinfo: cleanup extra spaces for complex 'From'\n      mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'\n      mailinfo: tests for RFC2047 examples\n\n\nThanks,\nKirill\n"},{"id":"101338","messageId":"7vzlhlic7d.fsf@gitster.siamese.dyndns.org","threadId":"17168","inReplyTo":"20090120191446.GB5721@roro3.zxlink","subject":"Re: John (zzz) Doe <john.doe@xz> (Comment)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-21T03:12:54Z","receivedAt":"2009-01-21T03:12:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Kirill Smelkov <kirr@landau.phys.spbu.ru> writes:\n\n> On Sun, Jan 18, 2009 at 10:50:12AM -0800, Junio C Hamano wrote:\n>> So we can separate \"John (zzz) Doe <john.doe@xz> (Comment)\" into:\n>> \n>> \tAUTHOR_EMAIL=john.doe@xz\n>>         AUTHOR_NAME=\"John (zzz) Doe (Comment)\"\n>> \n>> and leave it like so, I think.\n>\n> Ok, here you are:\n>\n> Subject: [PATCH 1/3] mailinfo: cleanup extra spaces for complex 'From'\n>\n> As described in RFC822 (3.4.3 COMMENTS, and  A.1.4.), comments, as e.g.\n>\n>     John (zzz) Doe <john.doe@xz> (Comment)\n>\n> should \"NOT [be] included in the destination mailbox\"\n>\n> On the other hand, quoting Junio:\n>\n>> The above quote from the RFC is irrelevant.  Note that it is only about\n>> how you extract the e-mail address, discarding everything else.\n>>\n>> What mailinfo wants to do is to separate the human-readable name and the\n>> e-mail address, and we want to use _both_ results from it.\n>>\n>> We separate a few example From: lines like this:\n>>\n>> \tKirill Smelkov <kirr@smelkov.xz>\n>> ==>\tAUTHOR_EMAIL=\"kirr@smelkov.xz\" AUTHOR_NAME=\"Kirill Smelkov\"\n>>\n>> \tkirr@smelkov.xz (Kirill Smelkov)\n>> ==>\tAUTHOR_EMAIL=\"kirr@smelkov.xz\" AUTHOR_NAME=\"Kirill Smelkov\"\n>>\n>> Traditionally, the way people spelled their name on From: line has been\n>> either one of the above form.  Typically comment form (i.e. the second\n>> one) adds the name at the end, while \"Name <addr>\" form has the name at\n>> the front.  But I do not think RFC requires that, primarily because it is\n>> all about discarding non-address part to find the e-mail address aka\n>> \"destination mailbox\".  It does not specify how humans should interpret\n>> the human readable name and the comment.\n>>\n>> Now, why is the name not AUTHOR_NAME=\"(Kirill Smelkov)\" in the latter\n>> form?\n>>\n>> It is just common sense transformation.  Otherwise it looks simply ugly,\n>> and it is obvious that the parentheses is not part of the name of the\n>> person who used \"kirr@smelkov.xz (Kirill Smelkov)\" on his From: line.\n>>\n>> So we can separate \"John (zzz) Doe <john.doe@xz> (Comment)\" into:\n>>\n>> \tAUTHOR_EMAIL=john.doe@xz\n>>         AUTHOR_NAME=\"John (zzz) Doe (Comment)\"\n>>\n>> and leave it like so, I think.\n>\n> So let's just correctly remove extra spaces which could be left inside\n> name.\n>\n> We need this functionality to pass all RFC2047 based tests in the next commit.\n>\n> Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>\n> ---\n> ...\n> Is it ok?\n\nI think the patch text looks good, but what you have as the proposed\ncommit log message does not look anything like log message we usually use.\n\n - If you agree with my comment that \"should NOT be included\" from the RFC\n   you quoted is irrelevant, then I do not think you would even want to\n   have anything before \"On the other hand,...\".\n\n - If you disagree, then why are you bending the patch text to match what\n   I say? ;-)\n\nAlso I am not sure \"passing RFC2047 based tests\" is a valid purpose nor\njustification for adding this patch (because you could argue that the\ntests and the results the tests expect are faulty).\n\nThe way we (and your patches) do thinks is to have the desired outcome\ndesigned first, and then have tests to make sure that the implementation\nmatches the desired outcome.\n\nGiven that, what I would probably suggest would be...\n\n-- 8< -- cut from here -- 8< --\n\nmailinfo: handle comment fields in From: line sanely\n\nMost commonly, people have their human readable name and their e-mail\naddress on their From: line in one of two formats:\n\n    Kirill Smelkov <kirr@smelkov.xz>\n    kirr@smelkov.xz (Kirill Smelkov)\n\nIn addition, you can have \"Comments\" in parentheses at random places, like\nthis:\n\n    John (zzz) Doe <john.doe@xz> (Comment)\n\nRFC822 defines rules to extract the \"destination mailbox\" out of such\ninput (and we correctly extract \"kirr@smelkov.xz\" and \"john.doe@xz\" from\nthese examples).  It however does not specify how to pick up the human\nreadable name from the remainder, and the existing code randomly dropped\npieces of information in <<<this and that way --- explain the breakage you\nwanted to fix with your patch, perhaps \"and left a newline in the result\"\nmay be one of the breakages>>>.\n\nThis patch changes the rule so that <<<explain what it does here.  I think\nwhat the code does is (1) remove the e-mail (and angle brackets around\nit), (2) sanitize LF into a single SP to keep the result a single line,\nand (3) as a special case, if the result is enclosed by () pair, remove\nthem---this rule is to format the second common case listed above\nsanely>>>.\n\nA subsequent patch using From: lines taken from the example section of\nRFC2047 will test this feature.\n\n-- >8 --\n"},{"id":"101437","messageId":"20090121203048.GB5400@roro3.zxlink","threadId":"17168","inReplyTo":"7vzlhlic7d.fsf@gitster.siamese.dyndns.org","subject":"Re: John (zzz) Doe <john.doe@xz> (Comment)","fromName":"Kirill Smelkov","fromEmail":"kirr@landau.phys.spbu.ru","sentAt":"2009-01-21T20:30:48Z","receivedAt":"2009-01-21T20:30:48Z","isPatch":false,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"On Tue, Jan 20, 2009 at 07:12:54PM -0800, Junio C Hamano wrote:\n> Kirill Smelkov <kirr@landau.phys.spbu.ru> writes:\n> > Is it ok?\n> \n> I think the patch text looks good, but what you have as the proposed\n> commit log message does not look anything like log message we usually use.\n> \n>  - If you agree with my comment that \"should NOT be included\" from the RFC\n>    you quoted is irrelevant, then I do not think you would even want to\n>    have anything before \"On the other hand,...\".\n> \n>  - If you disagree, then why are you bending the patch text to match what\n>    I say? ;-)\n\nI agree, really :)\n\nIt's only me usually tired in the end of the day, like today too.\n\nI'll try to have a rest and will reply with updated patch.\n\nThanks,\nKirill\n"}]}