From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a5-smtp.messagingengine.com (fout-a5-smtp.messagingengine.com [103.168.172.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1EB184DDB41 for ; Mon, 21 Sep 2026 18:01:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.148 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790013682; cv=none; b=JSpuphhr8+SvBkSZ1k/N/128wN8khGzTgxA6tcSrBIVn6bYLRrTt9HHw5rdX0HUOXdI0h8Bw8E8AGw6eqBY8modFbvFNmLjxuwXrzEaGtxUGuGJaqEK8sccrfTzeqTbg9ybLUbbwevexUAwLVjSYtl07lf/dp561xoRlfV9a5xw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790013682; c=relaxed/simple; bh=SZsqAZFEEHG+l73TE+crl6oKVktY/jSnB/bOieRKp8s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=TtpqoDAGINK+Wd0QHpGzAT1fHY8wJzVGwumZBmL9kQMbqqPx4LAEyRvdhGqcQ7UXuFG7c2oiWTwZiXPwzdIwsfjuHCYE/WVjiZe5rXA3+jkFyf6AcYNpScz6pkagYYC+MQB5Rqp31CgxBCvfRM9gum3bSPEO+w4paS/HkCJXMjs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=EXoFoUME; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=SDpkK3gH; arc=none smtp.client-ip=103.168.172.148 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="EXoFoUME"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="SDpkK3gH" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 07D4FEC02B0; Mon, 21 Sep 2026 14:01:20 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-04.internal (MEProxy); Mon, 21 Sep 2026 14:01:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1790013680; x=1790100080; bh=VNNOKQFgc1 oWwKrefCdv/TGDSuwbpsy9BawYgAG8gNw=; b=EXoFoUME7Qw59N+/xubskpkVkn vcBIfaOE2uxms4rknvFFWAhNQR+q7GBNpHp1006Lbi19Aj0HaahfrXm12x6gdIzj rDPfjkfc8rrjMUB8t1DQPIri4kPvR4VFt7GTzGjuOT0QDHchbYoKUUZpfKx0JxMC q0X9bzaHpSM8sIft3leVofRFBK8/86NHuFmQuC/yBp4KjVFR3AR4elMqwG3FAuK9 EzyUMj4e8WHFtEbIQbxg69HgZYFJpuwIirIloPV1TlAvDnYuhO01e3fkFM4NtUEK VPc+v+LTVGXVj+7BrI0cpxyJ4A5+nCCnvgAluoblZ7Ei1WQk7UM1btAq1qbg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1790013680; x=1790100080; bh=VNNOKQFgc1oWwKrefCdv/T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jbocJPxjh7UOkfOFc0vZwnU2Jqw X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Sep 2026 14:01:19 -0400 (EDT) From: Junio C Hamano To: Jacob Keller Cc: Haokai Ding via GitGitGadget , , =?utf-8?Q?Ren=C3=A9?= Scharfe , Haokai Ding Subject: Re: [PATCH] diff --no-index: fix -R with file/directory conflicts In-Reply-To: <0c82d50e-f2c0-4db6-ade8-7a403cac73da@intel.com> (Jacob Keller's message of "Sun, 20 Sep 2026 16:04:32 -0700") References: <0c82d50e-f2c0-4db6-ade8-7a403cac73da@intel.com> Date: Mon, 21 Sep 2026 11:01:18 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Jacob Keller writes: > On 9/18/2026 12:19 AM, Haokai Ding via GitGitGadget wrote: >> From: Haokai Ding >> >> When a path is a file on one side and a directory on the other, >> queue_diff() queues the file separately before recursing into the >> directory. This early queue entry bypasses the reverse_diff handling >> used for ordinary files. >> >> As a result, comparing directories d and e where d/sub is a file and >> e/sub/file is another file reports both paths as deleted with -R. >> Reversing the operands reports both paths as added instead. >> >> Swap the filespecs of the early queue entry when reverse_diff is set, >> so that -R reverses the file change as well as the directory contents. >> Add regression tests for both directions. >> >> Signed-off-by: Haokai Ding >> --- > > Thanks for fixing! > > Reviewed-by: Jacob Keller Thanks, both. Will queue.