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



On Mon, 2 Jul 2007, Andrew Morton wrote:
> 
> I'm afraid indenting the changelog with leading spaces doesn't help -
> patch(1) still tries to apply the diff.

Oh wow. I didn't believe you, so I decided to test.

I shouldn't have doubted you.

That also explains why it reacted to that 53c700 even though it wasn't at 
the beginning of a line.

That really is a piece of crap.

People who think that basic programs like "patch" should DWIM stuff like 
that are incompetent. Yes, I can see how it can be "convenient", but 
dammit, whoever added that convenince feature really is a total moron.

At the very least it should be off by default, and controlled by some flag 
(ie "patch --dwim"). As it is, it's on by default, and I don't see any way 
at all to disable it (not in the man-page, and not googling the source 
with google code-search).

That's just incredibly broken.

I guess I shouldn't be surprised. The whole "things should be convenient, 
not safe" approach is shown by the default high fuzz-factor too. But at 
least that one you can disable.

It's positively microsoftian to make programs blindly be "convenient", 
with no thinking about what that means for security and safety of the end 
result.

So I would suggest that in quilt and other systems, you either:

 - strip all headers manually

 - forget about "patch", and use "git-apply" instead that does things 
   right and doesn't screw up like this (and can do rename diffs etc too).

I guess the second choice generally isn't an option, but dammit, 
"git-apply" really is the better program here.

		Linus

  reply	other threads:[~2007-07-03  0:30 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
2007-07-02 21:40     ` Linus Torvalds
2007-07-02 21:56       ` Andrew Morton
2007-07-03  0:28         ` Linus Torvalds [this message]
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=alpine.LFD.0.98.0707021713200.9434@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=quilt-dev@nongnu.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).