From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Daniel Barkalow <barkalow@iabervon.org>, git@vger.kernel.org
Subject: Re: [PATCH] Fix "apply --reverse" with regard to whitespace
Date: Sun, 8 Jul 2007 13:47:05 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0707081344000.4248@racer.site> (raw)
In-Reply-To: <7vd4z32rqc.fsf@assigned-by-dhcp.cox.net>
Hi,
On Sun, 8 Jul 2007, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > "git apply" used to take check the whitespace in the wrong
> > direction.
> >
> > Noticed by Daniel Barkalow.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> >
> > On Fri, 6 Jul 2007, Daniel Barkalow wrote:
> >
> > > If you apply in reverse a patch which adds junk (e.g., terminal
> > > whitespace), it complains about the junk you're adding, even
> > > though (since it's in reverse) you're actually removing that
> > > junk.
> >
> > This fixes it.
>
> Hmm. Does this cover the "trailing blank lines removal" as
> well?
-- snip --
diff --git a/TODO b/TODO
index ecd2b85..8935376 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,5 @@
+interdiff between commits
diff with file/symlink
-remote remove <nick>
-libification: setjmp() error handler with xmalloc(), xcalloc(), xfree() handling
fix diff_filepair() mess in diff.c
merge -s rebase
build in ls-remote
diff --git a/t/t4116-apply-reverse.sh b/t/t4116-apply-reverse.sh
index 9ae2b3a..f3f9181 100755
--- a/t/t4116-apply-reverse.sh
+++ b/t/t4116-apply-reverse.sh
@@ -84,6 +84,7 @@ test_expect_success 'apply in reverse without postimage' '
test_expect_success 'reversing a whitespace introduction' '
sed "s/a/a /" < file1 > file1.new &&
+ echo >> file1.new &&
mv file1.new file1 &&
git diff | git apply --reverse --whitespace=error
'
-- snap --
Apparently.
Or not. Since a patch adding empty lines does not trigger any error with
--whitespace=error. I just tested that.
Ciao,
Dscho
prev parent reply other threads:[~2007-07-08 12:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-07 2:21 Minor bug in git-apply's patch-cleaning Daniel Barkalow
2007-07-07 17:50 ` [PATCH] Fix "apply --reverse" with regard to whitespace Johannes Schindelin
2007-07-08 9:02 ` Junio C Hamano
2007-07-08 12:47 ` Johannes Schindelin [this message]
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=Pine.LNX.4.64.0707081344000.4248@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).