git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Mark Rada <marada@uwaterloo.ca>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] tests: make all test files executable
Date: Fri, 2 Oct 2009 04:39:46 -0400	[thread overview]
Message-ID: <20091002083946.GA8627@coredump.intra.peff.net> (raw)
In-Reply-To: <20091002080134.GD27664@coredump.intra.peff.net>

On Fri, Oct 02, 2009 at 04:01:34AM -0400, Jeff King wrote:

> >  0 files changed, 0 insertions(+), 0 deletions(-)
> >  mode change 100644 => 100755 t/t5531-deep-submodule-push.sh
> >  mode change 100644 => 100755 t/t9501-gitweb-standalone-http-status.sh
> > 
> > diff --git a/t/t5531-deep-submodule-push.sh b/t/t5531-deep-submodule-push.sh
> > old mode 100644
> > new mode 100755
> > diff --git a/t/t9501-gitweb-standalone-http-status.sh
> > b/t/t9501-gitweb-standalone-http-status.sh
> > old mode 100644
> > new mode 100755
> 
> When applying via "am", I only got the first change in my tree. I'll see
> if I can confirm and make a test case.

Ah, nevermind. The problem is that your patch was word-wrapped, making
the second "diff --git" line bogus. It would have been nice to have it
print a warning instead of silently ignoring that bit of the patch.

I'm not sure if it is a good idea, though. git-apply sees that the "diff
--git" line is there but can't get a filename from it. Which _should_
cause it to barf when we get to the mode lines. But we first see the
wrapped filename and consider that patch section to be over (and the
mode lines just become cruft at the end of the patch, which we must
ignore).

And we must consider that patch section to be over when we see random
text, because we need to jump back to the outer parser looking for more
hunks. We could warn about a "diff --git" line that has no actual
changes associated with it, though that is certainly a user-visible
change. I also suspect it wouldn't help if there was a mode change
followed by some actual content changes.

Hmph.

-Peff

  reply	other threads:[~2009-10-02  8:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-02  1:59 [PATCH] tests: make all test files executable Mark Rada
2009-10-02  8:01 ` Jeff King
2009-10-02  8:39   ` Jeff King [this message]
2009-10-04 13:18     ` Mark Rada
2009-10-04 13:40       ` Jeff King
2009-10-05  1:25         ` Mark Rada
2009-10-05  9:59           ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2009-10-06  1:46 Mark Rada
2009-10-06 10:00 ` Jeff King

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=20091002083946.GA8627@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=marada@uwaterloo.ca \
    /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).