Article View: linux.kernel.git
Article #4254[PATCH 0/2] clone, fetch: reject a negative --jobs
From: Abhishek Agarwal
Date: Wed, 02 Dec 2026 17:13
Date: Wed, 02 Dec 2026 17:13
43 lines
12144 bytes
12144 bytes
In the review of aa/submodule-update-jobs [1], Junio pointed out that "git clone --recurse-submodules --jobs=-1" is ignored without a word, because clone uses -1 to mean "not given" and does not pass it on, while "--jobs=-2" is passed on and only rejected by "submodule update" after the clone is done. He wondered if "fetch" has a similar issue. It does: "git fetch" and "git pull" treat any negative "--jobs" as if the option was not given. These two patches make both commands reject a negative value while the command line is parsed, with the same message "submodule update" now gives. The series is built on top of aa/submodule-update-jobs, because the first patch adds its test next to the tests from that topic. Two things I was not sure about: - Both patches add the same small callback. I kept a copy in each command so that the two stay independent, but I can move it to parse-options-cb.c if that is preferred. - "git hook run -j-1" uses -1 to mean "all CPUs" (495b7d54dc). I did not do that here, because the configuration variables clone and fetch fall back to (submodule.fetchJobs and fetch.parallel) reject negative values and use 0 for "all CPUs", and so does "submodule update --jobs" after the topic above. [1] https://lore.kernel.org/git/xmqqtsl4zlyl.fsf@gitster.g/ Abhishek Agarwal (2): clone: reject a negative --jobs before cloning fetch: reject a negative --jobs builtin/clone.c | 18 ++++++++++++++++-- builtin/fetch.c | 18 ++++++++++++++++-- t/t5514-fetch-multiple.sh | 8 ++++++++ t/t7406-submodule-update.sh | 10 ++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-) base-commit: 5d6ad3960bf5d6e577b706d8c642429b504b065d -- 2.56.0
Technical Details
Message-ID:
<20261202171328.805150-1-agab0323@gmail.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76890-linux-kernel-git=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76890-linux-kernel-git=dewy.ru
From: agab0323@gmail.com (Abhishek Agarwal)
Newsgroups: linux.kernel.git
Subject: [PATCH 0/2] clone, fetch: reject a negative --jobs
Date: Wed, 2 Dec 2026 22:43:26 +0530
Organization: Usenet Network
Message-ID: <20261202171328.805150-1-agab0323@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2017946"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:6Ae6qHf5m/5Psi6qSyk5vFTPCqY= sha256:8aazUBjeUSRts/M/eCjaM0XZfPE9lgBgMpYbpf1stX0=
sha1:mim43NvgxglexGvRRPqCU6g0ERw= sha256:/vsipV1qFYHjXdoujtKikLj0HOWKwpT7KhlcIo9sZL8=
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 007921176C3; Wed, 2 Dec 2026 20:15:43 +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.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=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 vep1Z_3SKdXf;
Wed, 2 Dec 2026 20:15:39 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-76890-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 B7FD11176AD; Wed, 2 Dec 2026 20:15:28 +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 7853A27C20; Wed, 2 Dec 2026 17:15:26 +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=1796231726;
b=zrFfeweAclewqaPjpz6+nv0rxevJHPPtQWT/epbnPgsoGsxqgnDLH6b5364A2GlaRc3k
qmtWicZHCOJC4gtqYCmu7y1dTAYr/hzYrIcaJmV7OWxBF8P5pX4KamYJBibnmWuaz8yGb
RnLfgtCPJLDiEjQ4I45+OczK5iq9v7la6A4GZH7qtDq95fpswbYr+98YB6eC1Ujjh3/E3
Ji+pRTs1rme+QhkMC1/6kaL2LmxZo8f0lEjA0koBbM7WNSWXX7DGQsS6hJ7P7BP0DGW/X
Ec591zlVWrj52CfyI8ckIEWIje8KEjFQaYUPJFyqPfyIrEso67E15QDF62x2TA8SVyw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796231726;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:
List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
List-Owner:Precedence:MIME-Version:Content-Transfer-Encoding;
bh=2qIJTHQtWy7omBnXUSEj1uQG7L6rQuRImw0OtGp5/cU=;
b=n6MrbEbCuVoJvVCnoVagV31nnFfspbfLxBBxJoUduvAMWDTXwL+JlOkf45GVPjBIZXbX
Xl67QAQDG/0tjiFZdlh6rSx3fgRSjYeSxekgXURzHSmB3rme5BEuEPmlkC5GwSztEgjeE
mN4S3H73XiaiTELCsgivh7m//XDVWAj7HziKlBZtxl+yl5bNxK0MSiTTvvJ+4pkVxlXnZ
/mVoZC5zLy+E96JqhqAla/y5v2h0tLSmKoJ0Q4HDP9nSy3U3Ym4zOvbg73zsn+jk7Eugg
SXAxcYqsKxsaPE39a435TgPeR/546Iutl1vE0QDctVVMVnRYAW1EhhROU7CIN4WomJw==
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=20260707 header.b="Zlo1dn/V";
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 49EEC606A32F;
Wed, 2 Dec 2026 17:15:26 +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=Zlo1dn/V
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.47
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796231720;
b=ABgryLMylma7tDhgKpMBEtO5JpB4KynmZV0TxvHBDXO7N9JrG1vCdTN/H08LnufOW56Q
P9UXNYb87xerRCK4ZFZeIN5p/KECuFm9hdVpB+l/Pmk6x2+21iRa1neWuRAXPHGTWu0fF
JS5n5HTL268fHCDvOL3S8KrqZVFgltZU1DN5rTx+gypHwBXSREMsOXZi1yIjXA5dRgtlz
maw3eoJP2iZe7K6Y+hIlGx/FlmdU1HUvWI6nd5oFPeIn524bgL5Q1HZB0X6Cf56+tIxOD
U8B9W96fmHzUNdCQ3+qG8qSp62cLRusP/4V/Wdio41/p44wpvjvcOiPzaAas1IbHh2g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796231720;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding;
bh=2qIJTHQtWy7omBnXUSEj1uQG7L6rQuRImw0OtGp5/cU=;
b=mb+1xTr4wfC0EK1jjr7Tnhpk4TkopYu8MOdPVGdRKPmR/RIr7414eAthk27/zMOSdJ4B
sP6Ws6zCWB6zNamH6Vs2v9M9DRXeKLvhT9NMyVmETbwkDnHtvD8te1uRlB9kcs5WFRz7F
g5eza+UMgP1dxrApLjBCFyMEY23hrfZf466AeiO0ADUqwepACgAmANHtma1NHT5ipVbMw
S7hxsffshuqxlt8+Y+NhXWciaaBJbVnR+0VvD9qQUPXeAHby8UylrEy6/mSQomw666TTY
4XW7HommeQRcUVex0n7HNM2mzaS8MRuYRVSPghFu0s86a5Tc79NlADleBQcNEYd/ODg==
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=20260707 header.b="Zlo1dn/V";
arc=none smtp.remote-ip=209.85.216.47
X-Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47])
(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 11DFD606A329
for <git@vger.kernel.org>; Wed, 2 Dec 2026 17:15:19 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 11DFD606A329
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-pj1-f47.google.com with SMTP id 98e67ed59e1d1-3b567ae3d54so2286708a91.0
for <git@vger.kernel.org>; Wed, 02 Dec 2026 09:15:19 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1796231719; x=1796836519; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=2qIJTHQtWy7omBnXUSEj1uQG7L6rQuRImw0OtGp5/cU=;
b=Zlo1dn/VKwsqPslhGEza6V4gSPj25EOzNGuFed/e+tbEZFNUXy2AOAAQZOjUnzpbcd
zYdO9PZetaPV7nwNsiKpZS1OV+d7gNFfWrEgTo45rRk6Ewy8QxBXHVk4zbDlGKLeJ7AU
phPKrEudjiDW/+gpRefjQUrZT8jB1CGoX4V/8mGm7jQfzu/t27UTCM5BLpWGdkKaZdrU
FHaY73ZePpsLl727ls9XI/k5WcE01q2REHfqCk28HyudPE2hyvApN6B5szurWk6jHGKp
YsMP/uLcZUnucRCBRckmJckaE9IOGIo8MdXAPkbajXStthWAprgVg9wlNTaDi0blYhBx
+HCA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1796231719; x=1796836519;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=2qIJTHQtWy7omBnXUSEj1uQG7L6rQuRImw0OtGp5/cU=;
b=mHHv0xRhhAe78M1DG+SwSjlQOFyoLZ07tq20DLOxP94Sx2f253r09oy1Ys+ddpLmVP
6RAmjfRy/jCxSF71pGTtEiDa2YW/pFfBkjs9gDIOtfIU1UgS2youF+hWFYdexMlbjz7n
EIvnU+bdz4gEWDAVytrZhGS7zF1Ju+BoxP14guVlY4nu7C1j50EROk8OIUABUasGcSet
rdKTgKBZS3bxbD0dVM/gYH/r7GS7KaKUJXKvFy7KqW5q3xs6WKjESk8C6Epzyz1Jmg15
QmFjKvvJrwbDXh/kCM9v3AgxS4nuAmGjdlp8QXHvhNFG3AwE/lBO/zUpAoV9jsbkOEYl
LCnw==
X-Gm-Message-State: APuU4Z+69CNKUnfmf/fO67TaOI3iPnPEa4zdk+j84G1ZgXwPw3Mypiue
Okjuzehft5QzEHeu6Hyg6oMUDbZaPDojSdw/27wTlmmrtbthRl07drG5DVvock7gc74=
X-Gm-Gg: AZFdTZfMwRV0AJ3KNJG8Mth8pexTHk4SCWFMqskIpAF53xNQsJX0A+EN4SiXsR4+m/I
1eXJUdHbG9xRSNQnNZsUYMSKjFWKI+odEgcIDaMgMYyE8SQbKueCCwbzyIGAVeaNZ5+knELz9N+
YaeEpsIRvvhKwP5UOhuffvD6uKz0gxXBnjjKQ0+bxl9rhCvXx65ES2jh8aoL2EF0B5LBxQ/+DnV
q/w30h47uPpA6V3eJ95jFfP6dchPjlk9gT0EZUAAKpN3WcGvRDLUpFL4T7LHQxSeI81ueQBh62J
XtcOj2z3ck4jnS/fWXeOWaeXA8mC+MgEByR/hcm1p5mzKBJJIRgGBuF504fcW3lEm37JHU/Cmlg
YGw8oOnxkBfrjxW+DQg81LRzJkcD8QuhUxDdSm1LV56KVlP+zvPnA/XPVsmDr9fbUi7vucH9xbq
vrIeKeXa+8rTznNMJsmIP62AS8m3kj/Y0m+KlKXrBg75bszYEAIVdmyZkvakzucnJURPnL3T2Kt
Y+x1eRvEc8kWzk6m83Q8RR1lfF/Y04TGqk9KnHsfD4wKoPg0WcprBsJsK/n8WYi4XKVnrO2IIOd
Ij3E+u8T6Lh0mX/HoPMIN+HNGPFFfyLfNRC7KnjyPrkg+iHr+A==
X-Received: by 2002:a17:90b:3d50:b0:3b4:d312:8fb4 with SMTP id 98e67ed59e1d1-3b4d31292ebmr31143971a91.43.1796231719159;
Wed, 02 Dec 2026 09:15:19 -0800 (PST)
X-Received: from aeron-host ([103.177.178.109])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5c7d7a6b5sm9970a91.14.2026.12.02.09.15.17
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 02 Dec 2026 09:15:18 -0800 (PST)
X-Cc: Junio C Hamano <gitster@pobox.com>,
Patrick Steinhardt <ps@pks.im>,
Jacob Keller <jacob.keller@gmail.com>,
Adrian Ratiu <adrian.ratiu@collabora.com>
X-Mailer: git-send-email 2.56.0
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