From: Linus Torvalds Date: Tue, 31 Jan 2006 17:01:18 GMT Subject: Re: [PATCH] Make apply accept the -pNUM option like patch does. Message-ID: In-Reply-To: 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