git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: git@vger.kernel.org, quilt-dev@nongnu.org
Subject: Re: being nice to patch(1)
Date: Mon, 2 Jul 2007 14:25:57 -0700	[thread overview]
Message-ID: <20070702142557.eba61ccd.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.0.98.0707021409510.9434@woody.linux-foundation.org>

On Mon, 2 Jul 2007 14:16:16 -0700 (PDT)
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> 
> 
> On Mon, 2 Jul 2007, Andrew Morton wrote:
> > 
> > James's current git-scsi-misc has this commit in it:
> > 
> > commit a16efc1cbf0a9e5ea9f99ae98fb774b60d05c35b
> > Author: Kars de Jong <jongk@linux-m68k.org>
> > Date:   Sun Jun 17 14:47:08 2007 +0200
> > 
> > [SCSI] 53c700: Amiga 4000T NCR53c710 SCSI
> >     
> >     New driver for the Amiga 4000T built-in NCR53c710 SCSI controller, using the
> >     53c700 SCSI core.
> >     
> >     Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> >     Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
> > 
> > 
> > When one pulls that diff out of git with `git-show' or whatever, it doesn't
> > work - patch(1) has a heart attack over the "53c700":
> 
> There's really nothing git can do about this, this is a patch oddity about 
> the free-form message. A really strange one too, because the line is 
> literally four spaces followed by the 53c700, and the thing is, that's not 
> even a valid olf-fashioned patch (_without_ the four spaces, I could see 
> that "patch" might think that it's a really old ed-
> 
> I think you have two options:
> 
>  - tell patch to take it as a unified diff:
> 
> 	git show | patch -p1 -u
> 
>    should work, since patch won't be trying to figure out what kind of 
>    diff it is, and won't think that the 53c700 is some kind of odd ed 
>    script.

yup, `patch -u' fixes it up.

>  - suppress the free-form messages, by using (for example)
> 
> 	git show --pretty=oneline | patch -p1
> 
>    and now "patch" doesn't get any random commit message except for the 
>    first line (which always starts with the SHA1) and hopefully cannot 
>    _possibly_ interpret that to be some strange patch format.
> 
> Or, of course, just use "git-apply" instead of patch to apply the thing.
> 

Thing is, changelog-followed-by-diff is a fairly standard format used by
quilt and other such toys.

Hopefully quilt is using -u so it won't encounter this oddity.

  reply	other threads:[~2007-07-02 21:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-02 19:54 being nice to patch(1) Andrew Morton
2007-07-02 21:16 ` Linus Torvalds
2007-07-02 21:25   ` Andrew Morton [this message]
2007-07-02 21:40     ` Linus Torvalds
2007-07-02 21:56       ` Andrew Morton
2007-07-03  0:28         ` Linus Torvalds
2007-07-03  4:00           ` Junio C Hamano
2007-07-03  4:14             ` Linus Torvalds
2007-07-03 12:04               ` Johannes Schindelin
2007-07-03 12:21                 ` Paolo Ciarrocchi
2007-07-03 12:35                   ` Johannes Schindelin
2007-07-03 18:39                   ` Theodore Tso
2007-07-03 19:48                     ` Linus Torvalds
2007-07-03 20:55                       ` Paul Eggert
2007-07-03 21:30                         ` Linus Torvalds
2007-07-03 21:35                           ` Linus Torvalds
2007-07-03 13:22                 ` David Kastrup
2007-07-03 13:39                   ` Johannes Schindelin
2007-07-03 13:54                     ` David Kastrup
2007-07-03 15:01                       ` [PATCH] diff --no-index: fix --name-status with added files Johannes Schindelin
2007-07-03 15:01                       ` being nice to patch(1) Johannes Schindelin
2007-07-03 15:08                         ` David Kastrup
2007-07-06 12:38                 ` David Kastrup
2007-07-06 15:22                   ` git-diff memory/speed/disk impacts (was: being nice to patch(1)) David Kastrup
2007-07-06 18:08                   ` being nice to patch(1) Linus Torvalds
2007-07-03 13:34           ` [Quilt-dev] " Andreas Gruenbacher
2007-07-03 15:49             ` Andrew Morton
2007-07-03 16:03               ` Linus Torvalds
2007-07-03 16:03               ` Andreas Gruenbacher
2007-07-03 16:15                 ` Andrew Morton
2007-07-03 21:03                 ` Andrew Morton
2007-07-03 21:03             ` Andrew Morton

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=20070702142557.eba61ccd.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=quilt-dev@nongnu.org \
    --cc=torvalds@linux-foundation.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).