* core.whitespace space-in-indent feature request @ 2011-01-14 12:40 Victor Engmark 2011-01-18 19:51 ` Drew Northup 0 siblings, 1 reply; 6+ messages in thread From: Victor Engmark @ 2011-01-14 12:40 UTC (permalink / raw) To: git Hi all, I couldn't find this mentioned anywhere, but it would be useful for languages where you typically want only tab characters in indentation, like makefiles. Would be equivalent or similar to indent-with-non-tab and tabwidth=1. -- Victor Engmark ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: core.whitespace space-in-indent feature request 2011-01-14 12:40 core.whitespace space-in-indent feature request Victor Engmark @ 2011-01-18 19:51 ` Drew Northup 2011-01-18 20:31 ` Junio C Hamano [not found] ` <20205598.46894.1295382705010.JavaMail.trustmail@mail1.terreactive.ch> 0 siblings, 2 replies; 6+ messages in thread From: Drew Northup @ 2011-01-18 19:51 UTC (permalink / raw) To: Victor Engmark; +Cc: git On Fri, 2011-01-14 at 13:40 +0100, Victor Engmark wrote: > Hi all, > > I couldn't find this mentioned anywhere, but it would be useful for > languages where you typically want only tab characters in indentation, > like makefiles. Would be equivalent or similar to indent-with-non-tab > and tabwidth=1. Victor, What would the point of this be? Git doesn't change the layout of the code when storing it--that's up to the thing between the chair and the keyboard. -- -Drew Northup ________________________________________________ "As opposed to vegetable or mineral error?" -John Pescatore, SANS NewsBites Vol. 12 Num. 59 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: core.whitespace space-in-indent feature request 2011-01-18 19:51 ` Drew Northup @ 2011-01-18 20:31 ` Junio C Hamano [not found] ` <20205598.46894.1295382705010.JavaMail.trustmail@mail1.terreactive.ch> 1 sibling, 0 replies; 6+ messages in thread From: Junio C Hamano @ 2011-01-18 20:31 UTC (permalink / raw) To: Drew Northup; +Cc: Victor Engmark, git Drew Northup <drew.northup@maine.edu> writes: > On Fri, 2011-01-14 at 13:40 +0100, Victor Engmark wrote: >> Hi all, >> >> I couldn't find this mentioned anywhere, but it would be useful for >> languages where you typically want only tab characters in indentation, >> like makefiles. Would be equivalent or similar to indent-with-non-tab >> and tabwidth=1. > > Victor, > What would the point of this be? Git doesn't change the layout of the > code when storing it--that's up to the thing between the chair and the > keyboard. True, but I think Victor wants to be able to ask "diff --check" to complain and diff --color to highlight when it sees a line that begins with a SP (or a HT then SP) by setting: * whitespace=space-in-indent or something in the attributes file. As "equivalence" exists, not very much interested in coding it myself, though ;-) ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20205598.46894.1295382705010.JavaMail.trustmail@mail1.terreactive.ch>]
* Re: core.whitespace space-in-indent feature request [not found] ` <20205598.46894.1295382705010.JavaMail.trustmail@mail1.terreactive.ch> @ 2011-01-19 9:42 ` Victor Engmark 2011-01-19 11:09 ` Johannes Sixt [not found] ` <3798749.47565.1295432145824.JavaMail.trustmail@mail1.terreactive.ch> 1 sibling, 1 reply; 6+ messages in thread From: Victor Engmark @ 2011-01-19 9:42 UTC (permalink / raw) To: git On Jan 18, 2011, at 9:31 PM, Junio C Hamano wrote: > Drew Northup <drew.northup@maine.edu> writes: > >> On Fri, 2011-01-14 at 13:40 +0100, Victor Engmark wrote: >>> Hi all, >>> >>> I couldn't find this mentioned anywhere, but it would be useful for >>> languages where you typically want only tab characters in indentation, >>> like makefiles. Would be equivalent or similar to indent-with-non-tab >>> and tabwidth=1. >> >> Victor, >> What would the point of this be? Git doesn't change the layout of the >> code when storing it--that's up to the thing between the chair and the >> keyboard. > > True, but I think Victor wants to be able to ask "diff --check" to > complain and diff --color to highlight when it sees a line that begins > with a SP (or a HT then SP) by setting: > > * whitespace=space-in-indent > > or something in the attributes file. > > As "equivalence" exists, not very much interested in coding it myself, > though ;-) That's it, but it turns out the settings don't work the way I expected: $ git config --add core.whitespace 'indent-with-non-tab,tabwidth=1' $ touch whitespace.txt $ git add whitespace.txt [Add the following to the file] HT SP SP HT HT SP 2 SP 2 HT 8 SP $ git diff --color Only 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". Cheers, -- Victor ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: core.whitespace space-in-indent feature request 2011-01-19 9:42 ` Victor Engmark @ 2011-01-19 11:09 ` Johannes Sixt 0 siblings, 0 replies; 6+ messages in thread From: Johannes Sixt @ 2011-01-19 11:09 UTC (permalink / raw) To: Victor Engmark; +Cc: git Am 1/19/2011 10:42, schrieb Victor Engmark: > $ git config --add core.whitespace 'indent-with-non-tab,tabwidth=1' tabwidth= is not in any released version of git, yet. > Only the "SP HT" and "8 SP" indentations are colored; ... This is no surprise, unless you are using a version that has commit v1.7.4-rc0~52^2. -- Hannes ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <3798749.47565.1295432145824.JavaMail.trustmail@mail1.terreactive.ch>]
* Re: core.whitespace space-in-indent feature request [not found] ` <3798749.47565.1295432145824.JavaMail.trustmail@mail1.terreactive.ch> @ 2011-01-19 10:53 ` Victor Engmark 0 siblings, 0 replies; 6+ messages in thread From: Victor Engmark @ 2011-01-19 10:53 UTC (permalink / raw) To: Victor Engmark; +Cc: git On Jan 19, 2011, at 10:42 AM, Victor Engmark wrote: > On Jan 18, 2011, at 9:31 PM, Junio C Hamano wrote: > >> Drew Northup <drew.northup@maine.edu> writes: >> >>> On Fri, 2011-01-14 at 13:40 +0100, Victor Engmark wrote: >>>> Hi all, >>>> >>>> I couldn't find this mentioned anywhere, but it would be useful for >>>> languages where you typically want only tab characters in indentation, >>>> like makefiles. Would be equivalent or similar to indent-with-non-tab >>>> and tabwidth=1. >>> >>> Victor, >>> What would the point of this be? Git doesn't change the layout of the >>> code when storing it--that's up to the thing between the chair and the >>> keyboard. >> >> True, but I think Victor wants to be able to ask "diff --check" to >> complain and diff --color to highlight when it sees a line that begins >> with a SP (or a HT then SP) by setting: >> >> * whitespace=space-in-indent >> >> or something in the attributes file. >> >> As "equivalence" exists, not very much interested in coding it myself, >> though ;-) > > That's it, but it turns out the settings don't work the way I expected: > > $ git config --add core.whitespace 'indent-with-non-tab,tabwidth=1' > $ touch whitespace.txt > $ git add whitespace.txt > [Add the following to the file] > HT > SP > SP HT > HT SP > 2 SP > 2 HT > 8 SP Bloody OS X Mail - All those lines should of course be indented with the characters indicated at the end of the line. Cheers, -- Victor ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-01-19 11:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14 12:40 core.whitespace space-in-indent feature request Victor Engmark
2011-01-18 19:51 ` Drew Northup
2011-01-18 20:31 ` Junio C Hamano
[not found] ` <20205598.46894.1295382705010.JavaMail.trustmail@mail1.terreactive.ch>
2011-01-19 9:42 ` Victor Engmark
2011-01-19 11:09 ` Johannes Sixt
[not found] ` <3798749.47565.1295432145824.JavaMail.trustmail@mail1.terreactive.ch>
2011-01-19 10:53 ` Victor Engmark
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.