[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: [PATCH] Make apply accept the -pNUM option like patch does.
From: Linus Torvalds <torvalds () osdl ! org>
Date: 2006-01-31 17:01:18
Message-ID: Pine.LNX.4.64.0601310856381.7301 () g5 ! osdl ! org
[Download RAW message or body]
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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic