Thread (1 message) 1 message, 1 author, 2016-06-15

Re: core.whitespace space-in-indent feature request

From: Victor Engmark <hidden>
Date: 2016-06-15 22:50:26

On Jan 19, 2011, at 10:42 AM, Victor Engmark wrote:
On Jan 18, 2011, at 9:31 PM, Junio C Hamano wrote:
quoted
Drew Northup [off-list ref] writes:
quoted
On Fri, 2011-01-14 at 13:40 +0100, Victor Engmark wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help