whitespace checking in git-add?

5 messages, 3 authors, 2016-06-15 · open the first message on its own page

whitespace checking in git-add?

From: Chris Frey <hidden>
Date: 2016-06-15 22:46:15

Hi,

Is it possible to somehow enable whitespace checking during git-add?
In my searches, I can only seem to find mention of it in git-diff.

Thanks,
- Chris

Re: whitespace checking in git-add?

From: Nicolas Pitre <hidden>
Date: 2016-06-15 22:46:15

On Fri, 20 Feb 2009, Chris Frey wrote:
Hi,

Is it possible to somehow enable whitespace checking during git-add?
In my searches, I can only seem to find mention of it in git-diff.
One thing you can do is:

 1) 'git add' and 'git commit' as usual

 2) run 'git rebase -f --whitespace=fix HEAD~'


Nicolas

Re: whitespace checking in git-add?

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:46:15

Heya,

On Sat, Feb 21, 2009 at 03:14, Nicolas Pitre [off-list ref] wrote:
 2) run 'git rebase -f --whitespace=fix HEAD~'
Thanks for the plug ;), but you should note that that only works on a
very recent git. It's not even in master yet, according to [0] it's
been in next for only 7 days.

[0] http://repo.or.cz/w/git.git?a=search&h=refs/heads/next&st=commit&s=srabbelier

-- 
Cheers,

Sverre Rabbelier

Re: whitespace checking in git-add?

From: Nicolas Pitre <hidden>
Date: 2016-06-15 22:46:15

On Sat, 21 Feb 2009, Sverre Rabbelier wrote:
Heya,

On Sat, Feb 21, 2009 at 03:14, Nicolas Pitre [off-list ref] wrote:
quoted
 2) run 'git rebase -f --whitespace=fix HEAD~'
Thanks for the plug ;), but you should note that that only works on a
very recent git. It's not even in master yet, according to [0] it's
been in next for only 7 days.
Oh, OK...  Still better than a non existing feature.


Nicolas

Re: whitespace checking in git-add?

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:46:15

Heya,

On Sat, Feb 21, 2009 at 20:26, Nicolas Pitre [off-list ref] wrote:
On Sat, 21 Feb 2009, Sverre Rabbelier wrote:
quoted
On Sat, Feb 21, 2009 at 03:14, Nicolas Pitre [off-list ref] wrote:
quoted
 2) run 'git rebase -f --whitespace=fix HEAD~'
Thanks for the plug ;), but you should note that that only works on a
very recent git. It's not even in master yet, according to [0] it's
been in next for only 7 days.
Oh, OK...  Still better than a non existing feature.
That's true :). Btw, it's also possible to do:
$ git rebase --whitespace=fix HEAD~

The --whitespace=fix will automagically turn on the -f :).

-- 
Cheers,

Sverre Rabbelier
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help