From: Linus Torvalds <torvalds@osdl.org>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Ian Molton <spyro@f2s.com>, git@vger.kernel.org
Subject: Re: [PATCH] Make apply accept the -pNUM option like patch does.
Date: Tue, 31 Jan 2006 09:01:18 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0601310856381.7301@g5.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0601310015460.25300@iabervon.org>
On Tue, 31 Jan 2006, Daniel Barkalow wrote:
>
> This only applies to traditional diffs, not to git diffs.
Also, be careful: the default for git-apply is very different from the
default for a regular "patch".
"patch" without any "-p" at all will try to automagically figure out the
right file, which has burnt me more than once when you have the same name
(usually "Makefile") in multiple sub-directories and "patch" makes the
wrong automagic guess.
git-apply with this patch will continue to use -p1. No guessing, no gray
areas.
I do believe that the right thing to do is to just make SVN output "-p1"
patches (I cannot imagine that you can't do so, since -p1 is a much saner
format than -p0), but I guess teaching git-apply to take -pN for
traditional patches is fine.
But if somebody suggests we do the automatic thing that "patch" does, I'll
scream. Too many times have I been burnt by patch being "helpful" (in
general, patch by default will try very hard to apply a patch, whether it
makes sense or not).
Linus
prev parent reply other threads:[~2006-01-31 17:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-30 14:07 Importing diffs Ian Molton
2006-01-30 19:57 ` Greg KH
2006-01-31 5:36 ` [PATCH] Make apply accept the -pNUM option like patch does Daniel Barkalow
2006-01-31 17:01 ` Linus Torvalds [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.0601310856381.7301@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=spyro@f2s.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).