{"thread":{"id":"17598","subject":"git merge ignoring whitespace","startedAt":"2009-02-05T23:24:49Z","lastAt":"2009-02-13T01:38:19Z","messageCount":4,"participants":["layer","Junio C Hamano","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"103404","messageId":"2754.1233876289@relay.known.net","threadId":"17598","inReplyTo":null,"subject":"git merge ignoring whitespace","fromName":"layer","fromEmail":"layer@known.net","sentAt":"2009-02-05T23:24:49Z","receivedAt":"2009-02-05T23:24:49Z","isPatch":false,"sender":{"key":"layer@known.net","avatar":null},"body":"Junio, on 3/25/07 you said:\n\n  I know Linus does not like applying patches with whitespace\n  fuzziness, but I personally think a merge that ignores\n  whitespace changes would be a useful thing to have, without\n  having to call an external specialized merge backend. In other\n  words, I do not think it is so special a thing to want to, but\n  it is rather an unfortunate norm.  I am not opposed to give\n  git-merge-recursive a command line option to tell it to merge\n  ignoring the whitespace-only changes, when it does the 3-way\n  file-level merge internally.\n\nWhatever came of this?  I tried giving git merge a --ignore-whitespace\nargument and the error message that followed show no equivalent\nargument.\n\nIt would sure come in handy right now.  Is there some other way to do\nit that I didn't find searching the mailing list?\n\nThanks.\n\nKevin\n"},{"id":"103405","messageId":"7vtz78a1pn.fsf@gitster.siamese.dyndns.org","threadId":"17598","inReplyTo":"2754.1233876289@relay.known.net","subject":"Re: git merge ignoring whitespace","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-05T23:44:20Z","receivedAt":"2009-02-05T23:44:20Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"layer <layer@known.net> writes:\n\n> Junio, on 3/25/07 you said:\n>\n>   I know Linus does not like applying patches with whitespace\n>   fuzziness, but I personally think a merge that ignores\n>   whitespace changes would be a useful thing to have, without\n>   having to call an external specialized merge backend. In other\n>   words, I do not think it is so special a thing to want to, but\n>   it is rather an unfortunate norm.  I am not opposed to give\n>   git-merge-recursive a command line option to tell it to merge\n>   ignoring the whitespace-only changes, when it does the 3-way\n>   file-level merge internally.\n>\n> Whatever came of this?\n\nI do not know.  When I say \"I am not opposed to\", I mean just that. \n\nI may consider it a bad mode of operation, and I may hesitate to encourage\npeople to use it as their default.  But I do not feel strongly enough to\nveto it---as long as it is a rope you need to explicitly ask for to hang\nyourself with, I think it is Ok if we allowed such an option.\n\nIt is not my itch to scratch, and I do not keep track.\n\nDid you submit a patch that implements the new feature cleanly?\n"},{"id":"103406","messageId":"3047.1233877716@relay.known.net","threadId":"17598","inReplyTo":"7vtz78a1pn.fsf@gitster.siamese.dyndns.org","subject":"Re: git merge ignoring whitespace","fromName":"layer","fromEmail":"layer@known.net","sentAt":"2009-02-05T23:48:36Z","receivedAt":"2009-02-05T23:48:36Z","isPatch":false,"sender":{"key":"layer@known.net","avatar":null},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n\n>> layer <layer@known.net> writes:\n>> \n>> > Junio, on 3/25/07 you said:\n>> >\n>> >   I know Linus does not like applying patches with whitespace\n>> >   fuzziness, but I personally think a merge that ignores\n>> >   whitespace changes would be a useful thing to have, without\n>> >   having to call an external specialized merge backend. In other\n>> >   words, I do not think it is so special a thing to want to, but\n>> >   it is rather an unfortunate norm.  I am not opposed to give\n>> >   git-merge-recursive a command line option to tell it to merge\n>> >   ignoring the whitespace-only changes, when it does the 3-way\n>> >   file-level merge internally.\n>> >\n>> > Whatever came of this?\n>> \n>> I do not know.  When I say \"I am not opposed to\", I mean just that. \n>> \n>> I may consider it a bad mode of operation, and I may hesitate to encourage\n>> people to use it as their default.  But I do not feel strongly enough to\n>> veto it---as long as it is a rope you need to explicitly ask for to hang\n>> yourself with, I think it is Ok if we allowed such an option.\n>> \n>> It is not my itch to scratch, and I do not keep track.\n\nThanks for the summary.\n\n>> Did you submit a patch that implements the new feature cleanly?\n\nNope.  I'm just barely emerging from newbie status, so I'm probably a\nways away from implementing it.\n\nKevin\n"},{"id":"104468","messageId":"alpine.DEB.1.00.0902130231300.26370@racer","threadId":"17598","inReplyTo":"2754.1233876289@relay.known.net","subject":"Re: git merge ignoring whitespace","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-02-13T01:38:19Z","receivedAt":"2009-02-13T01:38:19Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 5 Feb 2009, layer wrote:\n\n> Junio, on 3/25/07 you said:\n> \n>   I know Linus does not like applying patches with whitespace\n>   fuzziness, but I personally think a merge that ignores\n>   whitespace changes would be a useful thing to have, without\n>   having to call an external specialized merge backend. In other\n>   words, I do not think it is so special a thing to want to, but\n>   it is rather an unfortunate norm.  I am not opposed to give\n>   git-merge-recursive a command line option to tell it to merge\n>   ignoring the whitespace-only changes, when it does the 3-way\n>   file-level merge internally.\n> \n> Whatever came of this?  I tried giving git merge a --ignore-whitespace\n> argument and the error message that followed show no equivalent\n> argument.\n\nI can think of two issues:\n\n- there was this -X patch by Junio, but I think it is a bad interface to \n  pass merge backend options, as it is not closely coupled with the \n  backend.  Just imagine this:\n\n\tgit merge -X ignore-whitespace -s resolve,recursive\n\n  Does the \"-X ignore-whitespace\" impact resolve, recursive, or both?  And \n  we'd need some way to specify the option to the backend.  I thought that\n\n\tgit merge -s resolve,recursive/ignore-whitespace\n\n  would be a sane syntax, but at least _I_ did not have a need to pass \n  backend options yet.\n\n- more fundamental, how should the merge ignoring whitespace work?  Which \n  version would it take if the lines agree _except_ for whitespace \n  changes?  This needs to be well designed, as we have not only merges \n  (where we have \"ours\" and \"theirs\"), but also rebases (where we have \n  \"theirs\" and _then_ \"ours\"), and of course recursive merges when there \n  is more than a single merge base (and there, it gets really nasty, so \n  you better have the semantics of the whitespace-ignoring merge put down \n  quite clearly).\n\n> It would sure come in handy right now.  Is there some other way to do\n> it that I didn't find searching the mailing list?\n\nOf course, you could try to \"normalize\" the whitespace, and perform the \nmerge after that.\n\nCiao,\nDscho\n\n  \n"}]}