Re: [PATCH 2/1] apply: reject input that touches outside $cwd

2015-01-30 Thread Jeff King
On Thu, Jan 29, 2015 at 03:48:14PM -0800, Junio C Hamano wrote: By default, a patch that affects outside the working area is rejected as a mistake; Git itself never creates such a patch unless the user bends backwards and specifies nonstandard prefix to git diff and friends. When `git

Re: [PATCH 2/1] apply: reject input that touches outside $cwd

2015-01-30 Thread Junio C Hamano
Jeff King p...@peff.net writes: It looks like your new --allow-uplevel goes to verify_path(). So this isn't just about .., but it will also protect against applying a patch inside .git. Which seems like a good thing to me, but I wonder if the option name is a little misleading. True; not

Re: [PATCH 2/1] apply: reject input that touches outside $cwd

2015-01-30 Thread Jeff King
On Fri, Jan 30, 2015 at 11:07:34AM -0800, Junio C Hamano wrote: Jeff King p...@peff.net writes: It looks like your new --allow-uplevel goes to verify_path(). So this isn't just about .., but it will also protect against applying a patch inside .git. Which seems like a good thing to me,

[PATCH 2/1] apply: reject input that touches outside $cwd

2015-01-29 Thread Junio C Hamano
By default, a patch that affects outside the working area is rejected as a mistake; Git itself never creates such a patch unless the user bends backwards and specifies nonstandard prefix to git diff and friends. When `git apply` is used without either `--index` or `--cached` option as a better