Article View: linux.kernel.git
Article #1533Re: [PATCH v4 1/4] pack-write: make index-pack output comment hash agnostic
From: Justin Tobler
Date: Mon, 26 Oct 2026 15:44
Date: Mon, 26 Oct 2026 15:44
39 lines
12576 bytes
12576 bytes
On 26/10/26 08:01AM, Karthik Nayak wrote: > Justin Tobler <jltobler@gmail.com> writes: > > > /* > > - * The first thing we expect from index-pack's output > > - * is "pack\t%40s\n" or "keep\t%40s\n" (46 bytes) where > > - * %40s is the newly created pack SHA1 name. In the "keep" > > - * case, we need it to remove the corresponding .keep file > > - * later on. If we don't get that then tough luck with it. > > + * The first thing we expect from index-pack's output is > > + * "pack\t<name>\n" or "keep\t<name>\n", where <name> is the hexadecimal > > + * name of the packfile it has just written. The line is therefore five > > + * bytes of prefix, `hexsz` bytes of name, and a trailing newline. A > > + * "keep" prefix tells us that index-pack has also created the > > + * corresponding ".keep" file. > > + * > > + * In the "keep" case, we need it to remove the corresponding ".keep" > > + * file later on. If we don't get that then tough luck with it. > > We start off saying we expect either '"pack\t<name>\n" or > "keep\t<name>\n"'. But the last line makes it seem like the latter is > always expected? Is that the case, or should this comment be moved to > the caller in 'fetch-pack.c'? Even though all callers of this function specify the `--keep` option to the git-index-pack(1) generating the output, it is expected that the output may be either "pack" or "keep". When git-index-pack(1) tries to create a lockfile, but one already exists, it simply ignores the error and returns a "pack" output line. The last line is from the original comment and indicates that when we do identify that a ".keep" file was created, it is something the caller must handle later on. The intent of this patch was just to update the comment to be hash agnostic. The next patch splits out the `read_index_pack_report()` function from `index_pack_lockfile()` and the last comment line is removed accordingly. So I'm inclined to leave this patch as-is. -Justin
Technical Details
Message-ID:
<at9v9p64l72xFEi8@denethor>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73347-linux-kernel-git=dewy.ruReferences:
<20261020132900.1208343-1-jltobler@gmail.com> <20261021182528.3055494-1-jltobler@gmail.com> <20261021182528.3055494-2-jltobler@gmail.com> <CAOLa=ZTnEJDPB6_fdFQFcM=zV21HEZ4gzzhWqB=A_euSzUut_w@mail.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-73347-linux-kernel-git=dewy.ru
From: jltobler@gmail.com (Justin Tobler)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v4 1/4] pack-write: make index-pack output comment hash
agnostic
Date: Mon, 26 Oct 2026 10:44:35 -0500
Organization: Usenet Network
Message-ID: <at9v9p64l72xFEi8@denethor>
References: <20261020132900.1208343-1-jltobler@gmail.com>
<20261021182528.3055494-1-jltobler@gmail.com>
<20261021182528.3055494-2-jltobler@gmail.com>
<CAOLa=ZTnEJDPB6_fdFQFcM=zV21HEZ4gzzhWqB=A_euSzUut_w@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
logging-data="1340066"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:8EZzQyhOUXbx4FkSyU7f/kv8pkA= sha256:XfpHCAx2xtVkSQoQ/cY6L4hW9xRvTp2crngCws3p6/g=
sha1:4JYclP7hH7v5plLzTnb/wN1Edio= sha256:q9Do4wJp6UuUrV3x6ZbENXBf7/+/2YDfEvauhBPouTg=
Content-Disposition: inline
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 43A66125BAF; Mon, 26 Oct 2026 18:48:18 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 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, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
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 f--4_onDuuhB;
Mon, 26 Oct 2026 18:48:15 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-73347-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 9E867125BAE; Mon, 26 Oct 2026 18:48:06 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 8B2FA25914; Mon, 26 Oct 2026 15:44:44 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793029484;
b=xeCh1Z7TaRreiox4EiFR2CyIo8i5rvLRivgFjD9D0Lazel5l6B46UmySg/iOdDmU0Dhy
wS96w0m440VT+lVBQUQMPj3X8UJPu5ULWuRyMOZtvGZhKzZWCzHsBLPRMpfaJjNyIt3cF
rjJLlkyrUFAxTWuwc6x/KYUXKvpRTmRIqFhn4uC53Hub48XO8XmEP8QpHnCkgjBaMj433
PNiPPEcFaILUAgl+ZF2+Iv1O5ZTgiJt2UQxzacZS8gHjJKPdqjEW3klyqdRIZFquWqs0R
W0iSG/yrw/TOD/FKVIeKJB/6kWG46T+7tHpk87FYo4g8oMcGbQH5qfssAAa6e95m2qA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793029484;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:Date:From:To:Cc:Subject:Message-ID:References:X-Mailing-List:
List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
List-Owner:Precedence:MIME-Version:Content-Type:Content-Disposition:
In-Reply-To;
bh=GpQ81czZDk0br1AVhto2WkP+jqUIUNjB2eT+qPRkCJo=;
b=oof1d12bvMN5D+pp6K7wbPeGxTBuHNrbgf58418ho21/0TX+Cc3PKdp6NFRkKKcumxW2
/pQYoi8Tatgzu8sYsASu9RXsVPHHkkESoHp9ax5ZEW9s/jM+AKBMgkBSweDXQ1gt8TFZq
6TM0xDJA3QkaY5cqtzrSlui6zYkssPg2M8bNJM3RgV0/S8WSfJRcRLkvK8FKa+A3eSdi9
u3ocBZqJ3cpReWl9943rSGbT6QUSqxZI12UpDgNmqnPfKYvnn29Fd32bKxftHYCfhUGfw
GGmuEZogDxyTkZMFtRokW/kIZkWKJxxp4au1OAm8T/3+oYhrnfFPPW295ffUtpoyuGg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=WWe2+Tvx;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B052606A323;
Mon, 26 Oct 2026 15:44:44 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=WWe2+Tvx
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.54
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793029483;
b=xxJrxOOdo2oAxMQySg3AfIMKi50DhEqjAUgOifsVetQk7BGif2CNR2dduEEeycrg2AnW
4EZ+3Nmee0GfqfimFHpxO6+3YMxS7XgAlpbT2jIOMW+fI5akMiUrBXlTs/rjbV/0JJYtM
ToM5slfFm6SUpS48WxkkfMwBe8QESXv8yTGColkQGiPSpQKoK5q7LldUSUtxI6a9zepjl
ksWAot5PWjcvhqzFD31tuPbUEDkMiCyjuiTLQR0aqtIaa2VqCIIdjy45YxUj1aeP9Bmh8
0nfb8meCfXhqOqYk0VrmKjjuEZw7Pa5TdgJ/BnRHNWvguO5Wk9G0hDVcqRsOtYPpM1w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793029483;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Date:From:To:Cc:
Subject:Message-ID:References:MIME-Version:Content-Type:
Content-Disposition:In-Reply-To;
bh=GpQ81czZDk0br1AVhto2WkP+jqUIUNjB2eT+qPRkCJo=;
b=Uu+FrOW9tZyBkmVoHDD+4qLOStzcL2hpj0SKGXrKNn5nuuPVSBjIWKr7vS6UWQrJqh3s
GcX9YmnwgcmxbWngUxbABKexT4GIztm4nd/e+F1enzr90ia0cNGpjGGBSlMo53ePVJpDJ
B0Lnjmims/dNKPnRYSlwdsnmd2GAKVsZjsl2luk/9uHI1qOG/46w2j97IJm+KJ/4AfHZi
ZRA14B/mWbfOwBXSyyIkvS0mypnXlGswJvpD7PxT8y7uhxKkyimxHigorTqPR9NoQEUx5
OMyGB9nQY2qPjrKE1uRFnyLKU9q5Oassfw+KMoLKBkikkgolHZTKgYL1KB/48nR2Q3g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=WWe2+Tvx;
arc=none smtp.remote-ip=209.85.210.54
X-Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D40D5606A31B
for <git@vger.kernel.org>; Mon, 26 Oct 2026 15:44:42 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D40D5606A31B
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-ot1-f54.google.com with SMTP id 46e09a7af769-823b938464fso2335458a34.2
for <git@vger.kernel.org>; Mon, 26 Oct 2026 08:44:42 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1793029482; x=1793634282; darn=vger.kernel.org;
h=in-reply-to:content-disposition:content-type:mime-version
:references:message-id:subject:cc:to:from:date:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=GpQ81czZDk0br1AVhto2WkP+jqUIUNjB2eT+qPRkCJo=;
b=WWe2+TvxkE/OZ1kiKuNT+CmE9ZH3pWVUVGuJ9sEk1PsQHhK8K3L+aSYyf7Zl2Ypsa+
6IgfhJAW8zf8aUsUkf0+39EKW02DzlGYV1/Sh5xym6emBoD2iuE4Aep5dHvZk4635Ok7
1dsUBiF5Ki0dilDAgCaSFeZg3fF83EkSIuia9zaY3345lkdGpcpA23OglRc7PcuySOob
/9O6plxFA99Y6AS4BzOftrp2qINAxA1t2Bn6a1vKtylAsFhjnQJLK7tg/zXXtl6fOJd1
3KQTqaY+Y7hmJP/vW4NtjplRDiSxFt4rsilMB94Lzm9HrBTgRBzyU+z73nz84+3a0+6P
rpdQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793029482; x=1793634282;
h=in-reply-to:content-disposition:content-type:mime-version
:references:message-id:subject:cc:to:from:date:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=GpQ81czZDk0br1AVhto2WkP+jqUIUNjB2eT+qPRkCJo=;
b=D0eth1rpi+M5AVkxdhiBdUh3YJP+0nlPSEL0yh1xD9k/qcHmXtQGTAHqWwApPWBTEd
Jf/FUG+e4Vi8b60f3/TQwJMN+ku4Zxr/GNwBQMDHdPpLTMl96X8t0ACoPT/59g5bCvuN
8pPjMbDiY6ksalM3293JeWkj6SPw+iJlcJu3edFxGGxXH4iD1L28wla8bouPG5ju8UIT
oFKKAKPTFHC9hM+LMYTOD1wTlFkRMXBS6p21B8dyQ628gMvii4eDr0woaG1QeqOBlV1x
W/MU+d20ybM+9azRexZs2RkBGdJwCccEMrzXHufZVCAZOSVrBiVdpmkuO7n/15iAaCT5
H3jQ==
X-Gm-Message-State: AFq9FYIA2bgneIPfvG811TiPvkauPWn9M4d3csJpQQwllgRCpLDNoZhY
Mkk2+GCA4v65C8YUJudxOpUpVg1GcQz7LSaZe4RNlGIdejGBe0YIf4ez
X-Gm-Gg: AYBFou3jJv985DKngPpc15+wA80goJG9y9JAGm24yPKGZo3uNmDZkE3MpNo0hYiqtK/
Dd2gFpxlya016/AI9c76ZRc6QO20K981Gdi61LU6eH2UTkHtqM0V1qiDiBOz0MRzGnha+pCHE8D
vHLXlSNb5i3w4kxm6ABGJniVxgywAxLVpkHeZc91YZnQDcBdkGfCr3TauHu/yRTzKz15FCHQC0Z
O+Ie2GB7JbjjcK/ytmbmVUnpqSif5yyxkPW35vh4ieYDsfe4Hq8JP74BfyC78hnL9sQeF5lVvNx
7TPrkyS8owJFEqCLwHMZuuBCf1k5OitnEm3hFZsMzIzX60+ZK5Sc5Awc6873g8MvXjmhH93y5VD
nKrf6hbINEJplJhHClWpvlEz45x2WRXlEOahYlXvy5K2FXbRyQyD/2DtTg2inTOIM9e/Gl2HEjy
xG/4HXzeiXfTiQFqhQ3xg99ke5KV1gVhGKfnhFtz8EYhSUyg3woc8n9e7aFRfouJkHZc28pqBkP
QJ9nK7DqotoRaFoc6HXiNoZRE7Vt1Dy6YY8v1GHq/wK+Dkj9V7dE/PBB8sfGGhxhevmL9phEpQF
YKhI
X-Received: by 2002:a05:6830:640e:b0:81b:ac5b:ea17 with SMTP id 46e09a7af769-850fedbbf50mr5936753a34.16.1793029480648;
Mon, 26 Oct 2026 08:44:40 -0700 (PDT)
X-Received: from localhost ([136.51.44.64])
by smtp.gmail.com with ESMTPSA id 46e09a7af769-850fa99ccfbsm8240887a34.5.2026.10.26.08.44.39
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 26 Oct 2026 08:44:40 -0700 (PDT)
X-Cc: git@vger.kernel.org, ps@pks.im
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <CAOLa=ZTnEJDPB6_fdFQFcM=zV21HEZ4gzzhWqB=A_euSzUut_w@mail.gmail.com>