Ignoring whitespace for diff and rebase

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Date: Friday, August 15, 2008 - 2:59 pm

Hello!

Sometimes, I use

     git diff -b > ~/tmp/patch
     git reset --hard HEAD
     git apply ~/tmp/patch

to clean up all only-whitespace changes. But if there are files which
only differ on whitespace, git-diff produces an empty patch block
(what's the correct name for it?) like

     diff --git a/hello b/hello
     index f2aa86d..ce01362 100644

which git-apply refuses to apply. Is this behaviour of git-diff
intentional or should I try to cook up a patch?

Another combination which does not for for me is --interactive and
--whitespace for rebase:

     > git rebase -i --whitespace=strip HEAD^
     fatal: Needed a single revision
     Invalid base

Is this an implementation bug or lack of a note of incompatibility in
the docs?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Ignoring whitespace for diff and rebase, Lars Noschinski, (Fri Aug 15, 2:59 pm)