From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753021AbbA3UUH (ORCPT ); Fri, 30 Jan 2015 15:20:07 -0500 Received: from pb-smtp1.int.icgroup.com ([208.72.237.35]:52327 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751769AbbA3UUF (ORCPT ); Fri, 30 Jan 2015 15:20:05 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=lSgbTQGyrYVlbx6s7l/z7mW/lH2Lq6iC xv+FyAr+auEu0Mk2HCnW5IrNBH5KDFl27iDv73VYA+zuoAbpTQh4COg+3NmgNRrq rTF3jH+PKzWMmq8PfUxIgKHDnQriOqbogKeRxJk9mu3QbnpZOpRktlA9XpWYzFiS K9BADG3AnNQ= From: Junio C Hamano To: Jeff King Cc: Git Mailing List , Josh Boyer , "Linux-Kernel\@Vger. Kernel. Org" , twaugh@redhat.com, Linus Torvalds Subject: Re: [PATCH] apply: refuse touching a file beyond symlink References: <20150130181153.GA25513@peff.net> <20150130201620.GA4133@peff.net> Date: Fri, 30 Jan 2015 12:20:02 -0800 In-Reply-To: <20150130201620.GA4133@peff.net> (Jeff King's message of "Fri, 30 Jan 2015 15:16:20 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 5FD85C88-A8BD-11E4-9C1A-7BA29F42C9D4-77302942!pb-smtp1.pobox.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jeff King 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.