Article View: linux.kernel.git
Article #3313Re: [PATCH v5 2/2] repo: make concern thresholds configurable
From: Christian Couder
Date: Wed, 18 Nov 2026 17:36
Date: Wed, 18 Nov 2026 17:36
48 lines
13767 bytes
13767 bytes
On Mon, Nov 2, 2026 at 7:39 PM Mark C. Chu-Carroll
<markchucarroll@fastmail.com> wrote:
> +static int config_concern_thresholds(const char *config_val_name,
> + const char *str_val,
> + const struct config_context *ctx,
> + void *cb)
> +{
> + struct concern_stat_threshold *thresholds = cb;
> + const char *concern_name;
> + if (skip_prefix(config_val_name, REPO_STRUCTURE_CONFIG_PREFIX, &concern_name)) {
> + for (int i = 0; thresholds[i].name; i++) {
In the previous patch `size_t i = 0` is used in the `for (...)`, so I
think the same should be used here.
> + if (!strcmp(thresholds[i].name, concern_name)) {
> + int threshold = git_config_int(concern_name, str_val, ctx->kvi);
The `threshold` member in `struct concern_stat_threshold` is a
`size_t` and that's where we are going to store the value from
nearest_log2_value() below. So it seems strange that we read only an
`int` from the config. I think this should use git_config_size_t() to
read a `size_t` instead.
Not sure also if the whole feature is supposed to work on 32 bit
systems. But maybe Git on a 32 bit system just cannot reach concerning
levels of anything.
> + if (threshold < 0) {
> + warning(_("invalid concern threshold '%d': value must be 0 or more"),
> + threshold);
> + return 0;
> + }
> + thresholds[i].threshold = nearest_log2_value(threshold);
> + return 0;
> + }
> + }
> + warning(_("invalid concern threshold name: '%s'"), concern_name);
> + }
> + return 0;
> +}
Technical Details
Message-ID:
<CAP8UFD39_1Km5JL9tZu1L+JDYxG5fyfAoLT1X55km85P=-o+BQ@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-75718-linux-kernel-git=dewy.ruReferences:
<20261102-b4-repo-structure-concern-v5-0-2d8f37b70b75@fastmail.com> <20261102-b4-repo-structure-concern-v5-2-2d8f37b70b75@fastmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-75718-linux-kernel-git=dewy.ru
From: christian.couder@gmail.com (Christian Couder)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v5 2/2] repo: make concern thresholds configurable
Date: Wed, 18 Nov 2026 18:36:43 +0100
Organization: Usenet Network
Message-ID: <CAP8UFD39_1Km5JL9tZu1L+JDYxG5fyfAoLT1X55km85P=-o+BQ@mail.gmail.com>
References: <20261102-b4-repo-structure-concern-v5-0-2d8f37b70b75@fastmail.com>
<20261102-b4-repo-structure-concern-v5-2-2d8f37b70b75@fastmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="2652555"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:553B+D0BmLhxt6c8ulz4uRoJTJo= sha256:JWYxVXitXnuJLl+WQmdAt17imQvi/P9RXffag2rSTMM=
sha1:fI8JZllZNiZjw6VyL1jXOTlzhdA= sha256:SuCfzDyp+kbnKHvBpY3hAF9i6L6fb95Pre7xyk/AU6w=
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 7366C11534B; Wed, 18 Nov 2026 20:37:23 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.149
X-Spam-Status: No, score=-3.149 tagged_above=-9999 required=6.31
tests=[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.249, 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 yUdC1qGzo69v;
Wed, 18 Nov 2026 20:37:20 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=git+bounces-75718-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id 3E530115343; Wed, 18 Nov 2026 20:37:10 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sto.lore.kernel.org (Postfix) with ESMTP id 4D63B6478CB; Wed, 18 Nov 2026 17:37:10 +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=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795023418;
b=YGp0qYx2QC7W/Qin1SL2XJtSowWjkndEfaFmuldKp++sG0MmN9rBKjecRxTPGQ1fyxf+
LUX4PZS3byGz8TunaeTGAsTD70YKB5wHQ37EbnKQTpR4BH4U1O/A0FVNoQdKpfVhR8Xkp
rTtNu9lkeamhzM7kfg4kaHuEmnkX7vRh3qwMVTwTDmpsOHaVnS3lX1bZ6Hcll1v+xcj8m
M2xDhWIqnRXSp1rTOXz4MnzRUZFLq4wwEVcNx/PYGIX7LU9yIO67+QyESgePrxBAOn0WH
Z+F+w9Bo54URoVasG3zBpZx3o1zCcUpzscvAmcbv0GENjVwg8GKCUoQJ7iEdx3VaMYg==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795023418;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:References:
In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:Cc:
Content-Type:Content-Transfer-Encoding;
bh=RiHGx907fC8LNfKwcbO/qKBA7IR6ya3D35m0P9SDypk=;
b=T3QKACeh9c9i2ltQdT3br4KvYwi1Tx7jgOz5oOrlzaK/6uD0PZmq/jyP7vwL5+jXrmbL
O87A28+gsxujENUawjlvCP5IkwIy4bPlwptFNVBsI6lJlN63bn7/w3zJw2F6FvYhvKydI
ACzG5NOrsTSd0DI9L6Oj60rcgIPsdHhFjQST2ddmPwH6NKNmQFxZEoAe0ZLHPS+5tKgQb
6keemCs+nKasUarKYrFn7/mxNcsChbiI7iZ04bF0K3ry12P0sd2MGbZdmqiSY8OqUEQbu
eKOi8vQXLNhJuRjHL/Cw3Cx013vMJ5GQ4fcUlfLwPYPQZMQvwIcj89a8Gy3MLktfGUw==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ASKgq7jt;
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 E767F606CA4E;
Wed, 18 Nov 2026 17:36:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ASKgq7jt
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=74.125.82.53
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795023417;
b=ik2U3N7Dy7mqCm9pIF/GfTWuRLxX7sQdRAtPNcOQPyARyvuVuTEHsTJMe7+24W/kfsCZ
BLGyoT2gacJPCxUi/Kr9vRomHhvhlOwW5EBDeOZ9wWQdT3QNQ1OjW/LVh+BW8+Lj1ItN5
wk/GckF2QYSECsXndFm/qmQK7doF15dXxgo9mvIf131vjnJINpBORMM/zzOUBSNdgSSaZ
FmPxj2+KSjfOdlYmeJgyWhcdlgFGqNpwiBTPzAQf40UkqnMHlVEsiJAb76mHMW8GSs78m
iRVBXU9wtEqYOBfPSAuwyVTHunEth9OAUqw+DW0aJXSjBLhVaxnXKJhT0yThU9yuwzA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795023417;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:MIME-Version:References:
In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:Cc:
Content-Type:Content-Transfer-Encoding;
bh=RiHGx907fC8LNfKwcbO/qKBA7IR6ya3D35m0P9SDypk=;
b=TTxl+f0xNjjqV9h3mbi2zKuRoOrJLQ7JpJpEdYiIMirwAFyHltUb8cEuBySVmnQo7Ok+
3N5RZgdZhliDPyTL3/V9KWdtqzGD50+iyUlNNHGlA7EQSjz2Fr818WVHdYHUqBPu7x4UH
f6B6JpOPvxpu6WxMeL9rbhDnmXdhNfKLYDNtetwz5CeuSmyPSX0rKxivHfGahuiFUqd9H
O7yR9PlKsWZ4eNDvvLUbPdOfvp/so9abC111p/+dFtADV124G+cBXzp42dkxjJnG3g5l+
He90W5E/Hkqs4rPFS8JwL8Ja59ojW2hvH6XeVPGm3I9HdGe6FTBpWLNqaAlIWARrRRg==
X-ARC-Authentication-Results: i=2; 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=20260707 header.b=ASKgq7jt;
arc=pass header.oldest-pass=0 smtp.remote-ip=74.125.82.53
X-Received: from mail-dl1-f53.google.com (mail-dl1-f53.google.com [74.125.82.53])
(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 BDAA7606CA40
for <git@vger.kernel.org>; Wed, 18 Nov 2026 17:36:56 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BDAA7606CA40
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-dl1-f53.google.com with SMTP id a92af1059eb24-1a2af4c8d00so2561913c88.0
for <git@vger.kernel.org>; Wed, 18 Nov 2026 09:36:56 -0800 (PST)
X-ARC-Seal: i=1; a=rsa-sha256; t=1795023416; cv=none;
d=google.com; s=arc-20260327;
b=fouaRT5be/0dcunSDYdYwnVz2XU3MJZ4hktWlYwtPeG3etHJgoJjyUl0FyXBVUSzcc
L3OIJNTJp7w0gaScYGiNBAqfa61yq2hvYfcdOIDbNTsTdIp/0g3vsmls0mEHK05jLcq+
oT2QqDBcbpPlJW6txBV7q8b/Y1PmdYm3/M8m6jUc/0eCXH9irMhqPJh+QmUVqK+Fnj5k
tsHwtzLa60nzQl0+aPtalxgfzoqLiS64MnkjBnNVWXDzf84FpgHxdWo7g+9mU80VRwF9
SOD0Z0S051oeB1BPM4rMNZPzMCUaIJVYE6HJIFCqAucdOGQw4xAc1p7Iuvx8Mtc5vZWD
kUKw==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:dkim-signature;
bh=RiHGx907fC8LNfKwcbO/qKBA7IR6ya3D35m0P9SDypk=;
fh=XhrkE/43V8t+PRT51BaZzfmatDRqywpwBCpxYwtL3QU=;
b=MbaIJ8hg57x6F477ogTGbA5kKMyGn8omc/JnkloD+Rbzn7PWqqrBt2pPMOWDrMIKd3
UuynJAaXzve3xPFAFcJzcnqoMbnhU5R/HDkZdk3hMLThJSoNr7vDOH8trYlkc0c/o78X
EXPoR/61ueYyGi420HJPD8sFv++/8hvpF+/XZ/y7QQNDSpzyoiKQSTyN/htFbSPpQBSm
+w+lQ2qK+2W0IWc44eWT2J9/W5+s1z9U8e0gJ8a7tcIdlYeLBRT/JyTUjqxQPOeOfcXu
gwMcGeVjE/iveG4rqw2ujeJfn71qkykuJS2ULp6wUpUuDLTA7ZV1b/UM5u3S8NuMFBH9
a7vg==;
darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1795023416; x=1795628216; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=RiHGx907fC8LNfKwcbO/qKBA7IR6ya3D35m0P9SDypk=;
b=ASKgq7jtfvBpfg5YvSE1WNZRMv4ggRHqBonhitwt8d/fFqSwZjfwJUsIwQ/rtQJ70l
AkJXv1J7Ccp40+B7+tVLoPROtLVyQ6l16hVAb17lbLLFyx0KkAiXl4664Kv+RfAGYuZg
E4tMl5h1GXZiae3vcTpddfR9IwmaxJjE8gzU/wDQsWJKrgslD3KINrP/0pwI3ee3CHAU
YDqwVtMuIdZ/w3TAq6Vx9Hpgr5OrFX80dpUF/TsTbdM7+oOSmVp6uPeIP/YwMGnIiMmc
xUyHaMG/fGVBJpebsI5RkHGn7Mg9t5e/fBKn6rUXXJEqGcY/MfPmZfWiyRHBgNFQ0nao
5tYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1795023416; x=1795628216;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=RiHGx907fC8LNfKwcbO/qKBA7IR6ya3D35m0P9SDypk=;
b=uRrI42LjUoPzCPyCjKQTVEu3zti3n+amCmtnu7PDPZVtBzah7ZWy8lFtvSGJbBc+hN
63j/8BK7JXJa4Q6ITGPJ0pe/uWPrMuxJ8JTJzu7zh1rvHSpIzJoZ7nVoPwC69rckzPrW
0FcYAlSYb9VV1ZnmfJYcYAQnXuHvJ2RoF8/Oe72cybVRU02/Fzs5/qIOcHlYLWDqEqIQ
xOFbQ3EpWMS3kPAtd46KL9KHEmxocQgmm91tdJyZStbQFu5V6VrPGP97SInqtc3GBv6j
81dh0Ef1nqBORRB3es3JAj/IESooWu2sBUA86nQuStS/PfxE7aopRNO3c6i1DnMZ33x+
8ZdA==
X-Gm-Message-State: APuU4Z9ASbOxTBJPXr0DgTW6sHqdispkP4152hKLzlsuTeVJqP9WqNX+
quICAx7lw7eCKZLOSShl6915cqnhwgRSqiNezmnnzKdRB5sYmq9hCVSnB0bJNraB6gL1/hxUeYv
rDfoItPLgBnBQL76YY8XJ0vp5PIKbOSORNOiReA8=
X-Gm-Gg: AYBFou0A5Cqhl/flIfHDBjyqv6GDqT7cf8X8U53yZmbbwPP2Iv8JIFhpEIOlZOkBXdE
ElMja/Y4klqx2tGdu7WPYwaF5qeBWzCVZbUCJOfOGJX81EnhhpgBfoXSXwof9vIhxACg51TnUTj
+omHoZZUPh2dwzxOfHk0euorx3TGlXdZyTlG9O3149RSyl8rQZxpgSYqZVnYKd+RhifctD5o/4H
A/+SrU0hiJmKYbht5u1/o5aThcmQsbKOSpNhQCGchP0VeCaG0ZCe7Gr+mFvawy0PPvqixgZMyu4
6p9lL4iavUnpBSaBDxT/Ag348H/+iSDkRwTXqBCOQME3r/q17Dxm8BYJkPmflE/fi/LfUjwzHEg
FARNwiv75xi+lgZly+094h21auOeWGtTwrSJKyNokWMbXaCm1AnH9WQOUuu388P+HnIHI/soIxQ
0pjCvguF+Rgy7N+L8w7N361Rk1Ll0d+i74/Df82XetEERkS1aPU7fHoXczavmmN9WO+0v/QQccO
0nJjFtxcjaIhowAyKV4JWXN
X-Received: by 2002:a05:7023:a8b:b0:1af:d88f:fc51 with SMTP id
a92af1059eb24-1b543d264e1mr3357531c88.30.1795023415738; Wed, 18 Nov 2026
09:36:55 -0800 (PST)
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: <20261102-b4-repo-structure-concern-v5-2-2d8f37b70b75@fastmail.com>
X-Gm-Features: AclHuK9wf4QP168zabeThwQFQjiZC3OtZ1Aje5JaxlCN6cYOhy43YBDugQnIVk4
X-Cc: git@vger.kernel.org