git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* whitespace checking in git-add?
@ 2009-02-20 23:04 Chris Frey
  2009-02-21  2:14 ` Nicolas Pitre
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Frey @ 2009-02-20 23:04 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: whitespace checking in git-add?
  2009-02-20 23:04 whitespace checking in git-add? Chris Frey
@ 2009-02-21  2:14 ` Nicolas Pitre
  2009-02-21 11:21   ` Sverre Rabbelier
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Pitre @ 2009-02-21  2:14 UTC (permalink / raw)
  To: Chris Frey; +Cc: git

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: whitespace checking in git-add?
  2009-02-21  2:14 ` Nicolas Pitre
@ 2009-02-21 11:21   ` Sverre Rabbelier
  2009-02-21 19:26     ` Nicolas Pitre
  0 siblings, 1 reply; 5+ messages in thread
From: Sverre Rabbelier @ 2009-02-21 11:21 UTC (permalink / raw)
  To: Nicolas Pitre; +Cc: Chris Frey, git

Heya,

On Sat, Feb 21, 2009 at 03:14, Nicolas Pitre <nico@cam.org> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: whitespace checking in git-add?
  2009-02-21 11:21   ` Sverre Rabbelier
@ 2009-02-21 19:26     ` Nicolas Pitre
  2009-02-21 19:40       ` Sverre Rabbelier
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Pitre @ 2009-02-21 19:26 UTC (permalink / raw)
  To: Sverre Rabbelier; +Cc: Chris Frey, git

On Sat, 21 Feb 2009, Sverre Rabbelier wrote:

> Heya,
> 
> On Sat, Feb 21, 2009 at 03:14, Nicolas Pitre <nico@cam.org> 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.

Oh, OK...  Still better than a non existing feature.


Nicolas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: whitespace checking in git-add?
  2009-02-21 19:26     ` Nicolas Pitre
@ 2009-02-21 19:40       ` Sverre Rabbelier
  0 siblings, 0 replies; 5+ messages in thread
From: Sverre Rabbelier @ 2009-02-21 19:40 UTC (permalink / raw)
  To: Nicolas Pitre; +Cc: Chris Frey, git

Heya,

On Sat, Feb 21, 2009 at 20:26, Nicolas Pitre <nico@cam.org> wrote:
> On Sat, 21 Feb 2009, Sverre Rabbelier wrote:
>> On Sat, Feb 21, 2009 at 03:14, Nicolas Pitre <nico@cam.org> 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.
>
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-21 19:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20 23:04 whitespace checking in git-add? Chris Frey
2009-02-21  2:14 ` Nicolas Pitre
2009-02-21 11:21   ` Sverre Rabbelier
2009-02-21 19:26     ` Nicolas Pitre
2009-02-21 19:40       ` Sverre Rabbelier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).