Article View: linux.kernel.git
Article #38Re: [PATCH v2 0/2] combine-diff: honor relative paths consistently
From: Junio C Hamano
Date: Wed, 07 Oct 2026 17:53
Date: Wed, 07 Oct 2026 17:53
58 lines
12130 bytes
12130 bytes
Muhammed Dilshad A <dilsheddilu123@gmail.com> writes: > The revised patch prints there/file as ../there/file when the prefix is > here/. All displayed names then use the same base. The tests cover both > discovery paths, including raw and NUL-separated output. This sounds like the most sensible behaviour, within the constraint that --relative must give a relative path to the prefix. > The index rejects repeated separators, but tree entry parsing does not > enforce the same check. The helper now skips all separators at the prefix > boundary, so it does not rely on there being only one. Explicit prefix > arguments stay literal, matching ordinary diff's filtering behavior. > I also wrapped the added C lines to fit the coding guidelines. Do *not* respond to review comments in your cover letter. Nobody reading the above, other than those who have seen our earlier exchange of you sending v1 patch with I commenting on it, would not know what you are talking about in the above, and especially what is so special about "repeated separators" without context. The cover letter should aim to welcome even those late-comming reviewers who missed an earlier round. Review response should be done as a response to a review message, unrelated to your rerolled patches. > While checking the two discovery paths, I found that the fast multi-tree > scan bypasses the relative-prefix filter entirely. Patch 2 fixes that > separately and adds tests for outside paths and repeated separators in > an explicit prefix. Great. > > Changes since v1: > > * Use relative_path() for parent names outside the prefix while keeping > ordinary diff's literal-prefix behavior for matching names. > * Preserve /dev/null, skip all boundary separators, and wrap long lines. > * Add cross-directory rename tests and the separate fast-scan fix. > > The developer build with SANITIZE=leak succeeds. The affected suites pass > all 77 normal tests with SHA-1 and SHA-256. A separate run with > LSAN_OPTIONS=detect_leaks=1 also passes without a leak report. The existing > three-parent coalescing failure in t4038 remains an expected failure. > > Muhammed Dilshad A (2): > combine-diff: honor --relative when printing paths > combine-diff: filter the fast scan by the relative prefix > > combine-diff.c | 70 ++++++++++++++++++--- > t/t4038-diff-combined.sh | 130 +++++++++++++++++++++++++++++++++++++++ > t/t4045-diff-relative.sh | 62 ++++++++++++++++++- > 3 files changed, 251 insertions(+), 11 deletions(-) > > > base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
Technical Details
Message-ID:
<xmqqh5ix8kji.fsf@gitster.g>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-71387-linux-kernel-git=dewy.ruReferences:
<xmqqld89bmd1.fsf@gitster.g> <cover.1791390459.git.dilsheddilu123@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-71387-linux-kernel-git=dewy.ru
From: gitster@pobox.com (Junio C Hamano)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v2 0/2] combine-diff: honor relative paths consistently
Date: Wed, 07 Oct 2026 10:53:05 -0700
Organization: Usenet Network
Message-ID: <xmqqh5ix8kji.fsf@gitster.g>
References: <xmqqld89bmd1.fsf@gitster.g>
<cover.1791390459.git.dilsheddilu123@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: usenet.network;
logging-data="701479"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:l7vXgrvpVWR0JH5RrSpfs48OpTk= sha256:4sHYIolm8JkaRF887a2N+d7i4Xpx/5OgCtDeWRaapKU=
sha1:LtFFfM4GV+YYMhnwdIf/R1wR90I= sha256:kNtvwOSkGdGT+Wyu00OPZz9kTmm0Brt9X8kOJnrJ6xY=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 40D2B10F1CF; Wed, 7 Oct 2026 20:54:39 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=pobox.com header.b=H5Jh8rTC; dkim=pass (2048-bit key)
header.d=messagingengine.com header.b=xC+eC8DG
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id ab2kgoyB_GnJ;
Wed, 7 Oct 2026 20:54:31 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-71387-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=pobox.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id ED82910F161; Wed, 7 Oct 2026 20:54:27 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by sea.lore.kernel.org (Postfix) with ESMTP id 95655325A6; Wed, 7 Oct 2026 17:53:10 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 58FE6430CCA;
Wed, 7 Oct 2026 17:53:10 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="H5Jh8rTC";
dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="xC+eC8DG"
X-Received: from fout-a2-smtp.messagingengine.com (fout-a2-smtp.messagingengine.com [103.168.172.145])
(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 CF6763E7BD5
for <git@vger.kernel.org>; Wed, 7 Oct 2026 17:53:07 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1791395589; cv=none; b=JJeg1a6oNKmR/6jTr1Xdf0tlPEZGOMa9zjiPThRn4JXCiDM+yoN4WWpReHLtmyvRG7JRB2ZbqB/YzTpTij2kWCvZBYYgaG0/rRamosXfoCPNBjKxtCBkEpnFTfYhhsna9breQjT6xGz3kQIugGxmkIUA5nEYqVAjYTYS7cHqhpM=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1791395589; c=relaxed/simple;
bh=/NP5Ber69Bl+vpG4Bsdh0u29T6+03dM7ucgzTTO98Zs=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=dEub9yFIUaBWY+6sWu65nyNDwoDQrp8erfhE18HlGh9CKgyXMLKwe2YvqPZsksvcbQEVqyrB3yaN4TNSCAy6yWp5nDduKBq2XKQ1ajV/IUioN4zbGn5GMjP1CqA06omTNzj6gOyr0BLdo2ltYhoK73nfYzNFazv7Ty+enyfELEs=
X-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=H5Jh8rTC; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=xC+eC8DG; arc=none smtp.client-ip=103.168.172.145
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com
X-Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41])
by mailfout.phl.internal (Postfix) with ESMTP id 17E80EC0467
for <git@vger.kernel.org>; Wed, 7 Oct 2026 13:53:07 -0400 (EDT)
X-Received: from phl-frontend-02 ([10.202.2.161])
by phl-compute-01.internal (MEProxy); Wed, 07 Oct 2026 13:53:07 -0400
X-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=fm1; t=1791395587; x=1791481987; bh=WIbbEFRxAJ
vInRTtpc3GK3Og386S7bgMeZSyPnHdZbc=; b=H5Jh8rTCLQ+CK60mG0gPuiOMhm
tvr+iB3HYnfIAWx5D19P4+0hzG8dS1uBg5fARZDJ6R9A9w0l/0ki0McRMgIWNixo
4n0h6n8ri3cYzDrD0Ntbw15LLVIFUtynqtmsLwfTMXKp7s+mCd2qTPc3I49esl9D
mvmErnHdtnyDw61HHu5+a0iyr08nAXYivk5XVv5MdorT3LT6JMnR2zlyD7ED3Rym
ZSG94ZFhacOXXzk+Xu67nRFXjqqnGfJnhk3F0rumkFBmNANDPyq1AFFz+HdN8NOy
DtcIFTbYmm6UKykcUakic/+CG8VrCRY1pzIwQwhxeTPULOW01z3mdnHPP1jg==
X-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=fm2; t=
1791395587; x=1791481987; bh=WIbbEFRxAJvInRTtpc3GK3Og386S7bgMeZS
yPnHdZbc=; b=xC+eC8DGpxydJkZru4dOgclQ1l+7iqIuw1PpA13Eqc6FI+aFDIG
R6uuD4kyrqQv2rGI9MpI7NvR3LLPg6l65XF6jYTAdWnJu7QcKNRj4ISdCPPKbMwl
7LqLsm5fU3OXuZR4wMtliHpaYlL8bM0qcS2sAhuu4+4LGjd6SpUGTnl+sdF0O7+W
nJ0NXJZ5ayOyxSnsP4m7sQ5D9DSkXP23FAMKpwrshZbKH9FpTE4y00NTkihiDKcs
TMqaff9ycLibrvXDgHAEPxdQY7joFhI6N+w93v2pUvH/VPwACYlPIAIwCy8E+0T7
iNVcswfYu3z4ylebdFdg1mz40xS0y4858Nw==
X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-06;
repo=github.com/dkim2wg/interop; date=2026-10-04; sw=lmtpprox;
action=sign d=pobox.com a=rsa-sha256;
X-DKIM2-Signature: i=1; m=1; t=1791395587; d=pobox.com;
mf=PGdpdHN0ZXJAcG9ib3guY29tPg==;
rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+;
s=fm1:rsa-sha256:azk78myzFtPpYtM/IH9qA4HmbLRnq3GeI2xuU+Ymn7OvXPc
JEzhcFWcKJZCfPZVwLA8DdjaiGtIlp3npFWoJps9A9bXTqWCpwXVZAeWVP0eF7Mm
FORXlD3u7L9oA4DE7aFxCy2YBmEQm2HmP1KjC7luI59rzIPKj/8oP4wZoOHknOMT
nxzcDrD290PPkFsQKD21+ncPsN7Im+HoNYO+pMtdZg+gQTuPVgp2NDJrwxy4/BV6
QkWLjmw9x4ginHW4W73oVa1m6OoX3cKeF/h/tf4kfg4kBTqgJHFK1ZzUBGn19+1b
X+J4PhfJnt0npOp0peN6L+NWxnxvPE9itHutYgA==;
X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-06;
repo=github.com/dkim2wg/interop; date=2026-10-04; sw=lmtpprox;
action=mi-m=1; hc=12;
hn=cc,content-type,date,feedback-id,from,in-reply-to,message-id,
mime-version,references,subject,to,user-agent;
X-Message-Instance: m=1; h=sha256:rWtQdc9tOGW8wmk3tlni9neQ3NQyAjeB6HqwojJW8Dk=:/NP5Ber69Bl+vpG4Bsdh0u29T6+03dM7ucgzTTO98Zs=;
X-ME-S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xzzFD-jPF7uqAspFp7CWXW7O4uw>
<xmx:A4fGaqZn-k0_qqs78sjHv0dFsikQB3PYQbbEbXh7yMfWtx5ddckPjQ>
<xmx:A4fGatjGVrgiCDqgsZ4vUKYQIqraxUKQ__kbe9UDi9h7v4IJrrTbPA>
<xmx:A4fGas7Di4AjrVfAhNPNYnAZ9hOj_kWornQyrnnQUFcbkduz3MhZmA>
<xmx:A4fGasD1Z4bHSqZP89kfA-BA12MYQdVI4tovWMDcWX1Cn66yWTGTEpLF>
X-Feedback-ID: if26b431b:Fastmail
X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
7 Oct 2026 13:53:06 -0400 (EDT)
X-Cc: git@vger.kernel.org
X-In-Reply-To: <cover.1791390459.git.dilsheddilu123@gmail.com> (Muhammed Dilshad
A.'s message of "Wed, 7 Oct 2026 22:05:12 +0530")
X-User-Agent: Gnus/5.13 (Gnus v5.13)
X-Precedence: bulk
X-Mailing-List: git@vger.kernel.org
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>