Re: [PATCH] apply: refuse touching a file beyond symlink
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 30, 2015, 20:20 UTC
- Message-ID
- <xmqqwq44auml.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20150130201620.GA4133@peff.net>
Jeff King <peff@peff.net> writes:
> I had the impression that we did not apply in any arbitrary order that > could work, but rather that we did deletions first followed by > additions. But I am fairly ignorant of the apply code.
No, you are thinking about the write-out of the finished result, which may have to turn existing directory to a file or vice versa on the filesystem, but that happens _after_ we decide what to turn into what else, completely in-core.
And the decision to determine what the input _means_ should not depend on the order of patches in the input.