{"thread":{"id":"26281","subject":"core.whitespace space-in-indent feature request","startedAt":"2011-01-14T12:40:49Z","lastAt":"2011-01-19T11:09:53Z","messageCount":6,"participants":["Victor Engmark","Drew Northup","Junio C Hamano","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"159483","messageId":"AANLkTikiHXofGVg9QECg9a4U4r4VGD1tb6oMV21nzd9W@mail.gmail.com","threadId":"26281","inReplyTo":null,"subject":"core.whitespace space-in-indent feature request","fromName":"Victor Engmark","fromEmail":"victor.engmark@gmail.com","sentAt":"2011-01-14T12:40:49Z","receivedAt":"2011-01-14T12:40:49Z","isPatch":false,"sender":{"key":"victor.engmark@gmail.com","avatar":"https://gravatar.com/avatar/5d7b4229a48f2ed011a265c19a1881c4ee58946449215db6627373a244c8aa4c?d=mp&s=160"},"body":"Hi all,\n\nI couldn't find this mentioned anywhere, but it would be useful for\nlanguages where you typically want only tab characters in indentation,\nlike makefiles. Would be equivalent or similar to indent-with-non-tab\nand tabwidth=1.\n\n-- \nVictor Engmark\n"},{"id":"159593","messageId":"1295380297.3778.47.camel@drew-northup.unet.maine.edu","threadId":"26281","inReplyTo":"AANLkTikiHXofGVg9QECg9a4U4r4VGD1tb6oMV21nzd9W@mail.gmail.com","subject":"Re: core.whitespace space-in-indent feature request","fromName":"Drew Northup","fromEmail":"drew.northup@maine.edu","sentAt":"2011-01-18T19:51:37Z","receivedAt":"2011-01-18T19:51:37Z","isPatch":false,"sender":{"key":"drew.northup@maine.edu","avatar":"https://avatars.githubusercontent.com/u/18331571?v=4"},"body":"\nOn Fri, 2011-01-14 at 13:40 +0100, Victor Engmark wrote:\n> Hi all,\n> \n> I couldn't find this mentioned anywhere, but it would be useful for\n> languages where you typically want only tab characters in indentation,\n> like makefiles. Would be equivalent or similar to indent-with-non-tab\n> and tabwidth=1.\n\nVictor,\nWhat would the point of this be? Git doesn't change the layout of the\ncode when storing it--that's up to the thing between the chair and the\nkeyboard.\n\n-- \n-Drew Northup\n________________________________________________\n\"As opposed to vegetable or mineral error?\"\n-John Pescatore, SANS NewsBites Vol. 12 Num. 59\n"},{"id":"159594","messageId":"7vwrm2j6nv.fsf@alter.siamese.dyndns.org","threadId":"26281","inReplyTo":"1295380297.3778.47.camel@drew-northup.unet.maine.edu","subject":"Re: core.whitespace space-in-indent feature request","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-01-18T20:31:00Z","receivedAt":"2011-01-18T20:31:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Drew Northup <drew.northup@maine.edu> writes:\n\n> On Fri, 2011-01-14 at 13:40 +0100, Victor Engmark wrote:\n>> Hi all,\n>> \n>> I couldn't find this mentioned anywhere, but it would be useful for\n>> languages where you typically want only tab characters in indentation,\n>> like makefiles. Would be equivalent or similar to indent-with-non-tab\n>> and tabwidth=1.\n>\n> Victor,\n> What would the point of this be? Git doesn't change the layout of the\n> code when storing it--that's up to the thing between the chair and the\n> keyboard.\n\nTrue, but I think Victor wants to be able to ask \"diff --check\" to\ncomplain and diff --color to highlight when it sees a line that begins\nwith a SP (or a HT then SP) by setting:\n\n\t* whitespace=space-in-indent\n\nor something in the attributes file.\n\nAs \"equivalence\" exists, not very much interested in coding it myself,\nthough ;-)\n"},{"id":"159636","messageId":"09F2551C-40E6-40DC-BE97-8DCFF3601C8C@terreactive.ch","threadId":"26281","inReplyTo":"20205598.46894.1295382705010.JavaMail.trustmail@mail1.terreactive.ch","subject":"Re: core.whitespace space-in-indent feature request","fromName":"Victor Engmark","fromEmail":"victor.engmark@terreactive.ch","sentAt":"2011-01-19T09:42:27Z","receivedAt":"2011-01-19T09:42:27Z","isPatch":false,"sender":{"key":"victor.engmark@terreactive.ch","avatar":null},"body":"On Jan 18, 2011, at 9:31 PM, Junio C Hamano wrote:\n\n> Drew Northup <drew.northup@maine.edu> writes:\n> \n>> On Fri, 2011-01-14 at 13:40 +0100, Victor Engmark wrote:\n>>> Hi all,\n>>> \n>>> I couldn't find this mentioned anywhere, but it would be useful for\n>>> languages where you typically want only tab characters in indentation,\n>>> like makefiles. Would be equivalent or similar to indent-with-non-tab\n>>> and tabwidth=1.\n>> \n>> Victor,\n>> What would the point of this be? Git doesn't change the layout of the\n>> code when storing it--that's up to the thing between the chair and the\n>> keyboard.\n> \n> True, but I think Victor wants to be able to ask \"diff --check\" to\n> complain and diff --color to highlight when it sees a line that begins\n> with a SP (or a HT then SP) by setting:\n> \n> \t* whitespace=space-in-indent\n> \n> or something in the attributes file.\n> \n> As \"equivalence\" exists, not very much interested in coding it myself,\n> though ;-)\n\nThat's it, but it turns out the settings don't work the way I expected:\n\n$ git config --add core.whitespace 'indent-with-non-tab,tabwidth=1'\n$ touch whitespace.txt\n$ git add whitespace.txt\n[Add the following to the file]\n\tHT\nSP\n\tSP HT\n\t HT SP\n 2 SP\n\t\t2 HT\n       8 SP\n$ git diff --color\n\nOnly the \"SP HT\" and \"8 SP\" indentations are colored; I expected \"SP\" and \"2 SP\" to also be colored, and I would expect space-in-indent to also trigger on \"HT SP\".\n\nCheers,\n-- \nVictor\n"},{"id":"159640","messageId":"4A1964D5-609C-418B-BDEF-F5B52EC98F95@terreactive.ch","threadId":"26281","inReplyTo":"3798749.47565.1295432145824.JavaMail.trustmail@mail1.terreactive.ch","subject":"Re: core.whitespace space-in-indent feature request","fromName":"Victor Engmark","fromEmail":"victor.engmark@terreactive.ch","sentAt":"2011-01-19T10:53:17Z","receivedAt":"2011-01-19T10:53:17Z","isPatch":false,"sender":{"key":"victor.engmark@terreactive.ch","avatar":null},"body":"On Jan 19, 2011, at 10:42 AM, Victor Engmark wrote:\n\n> On Jan 18, 2011, at 9:31 PM, Junio C Hamano wrote:\n> \n>> Drew Northup <drew.northup@maine.edu> writes:\n>> \n>>> On Fri, 2011-01-14 at 13:40 +0100, Victor Engmark wrote:\n>>>> Hi all,\n>>>> \n>>>> I couldn't find this mentioned anywhere, but it would be useful for\n>>>> languages where you typically want only tab characters in indentation,\n>>>> like makefiles. Would be equivalent or similar to indent-with-non-tab\n>>>> and tabwidth=1.\n>>> \n>>> Victor,\n>>> What would the point of this be? Git doesn't change the layout of the\n>>> code when storing it--that's up to the thing between the chair and the\n>>> keyboard.\n>> \n>> True, but I think Victor wants to be able to ask \"diff --check\" to\n>> complain and diff --color to highlight when it sees a line that begins\n>> with a SP (or a HT then SP) by setting:\n>> \n>> \t* whitespace=space-in-indent\n>> \n>> or something in the attributes file.\n>> \n>> As \"equivalence\" exists, not very much interested in coding it myself,\n>> though ;-)\n> \n> That's it, but it turns out the settings don't work the way I expected:\n> \n> $ git config --add core.whitespace 'indent-with-non-tab,tabwidth=1'\n> $ touch whitespace.txt\n> $ git add whitespace.txt\n> [Add the following to the file]\n> \tHT\n> SP\n> \tSP HT\n> \t HT SP\n> 2 SP\n> \t\t2 HT\n>       8 SP\n\nBloody OS X Mail - All those lines should of course be indented with the characters indicated at the end of the line.\n\nCheers,\n-- \nVictor"},{"id":"159641","messageId":"4D36C681.7020400@viscovery.net","threadId":"26281","inReplyTo":"09F2551C-40E6-40DC-BE97-8DCFF3601C8C@terreactive.ch","subject":"Re: core.whitespace space-in-indent feature request","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2011-01-19T11:09:53Z","receivedAt":"2011-01-19T11:09:53Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 1/19/2011 10:42, schrieb Victor Engmark:\n> $ git config --add core.whitespace 'indent-with-non-tab,tabwidth=1'\n\ntabwidth= is not in any released version of git, yet.\n\n> Only the \"SP HT\" and \"8 SP\" indentations are colored; ...\n\nThis is no surprise, unless you are using a version that has commit\nv1.7.4-rc0~52^2.\n\n-- Hannes\n"}]}