git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars Noschinski <lars-2008-1@usenet.noschinski.de>
To: git@vger.kernel.org
Subject: Ignoring whitespace for diff and rebase
Date: Fri, 15 Aug 2008 20:59:20 +0200	[thread overview]
Message-ID: <20080815185920.GA3646@lars.home.noschinski.de> (raw)

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?

                 reply	other threads:[~2008-08-15 19:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080815185920.GA3646@lars.home.noschinski.de \
    --to=lars-2008-1@usenet.noschinski.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).