From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.47 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== 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== 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 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 ; Wed, 2 Dec 2026 17:15:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 11DFD606A329 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com 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=20260707 header.b=Zlo1dn/V Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-3b567ae3d54so2286708a91.0 for ; Wed, 02 Dec 2026 09:15:19 -0800 (PST) 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) 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) From: Abhishek Agarwal To: git@vger.kernel.org Cc: Junio C Hamano , Patrick Steinhardt , Jacob Keller , Adrian Ratiu Subject: [PATCH 0/2] clone, fetch: reject a negative --jobs Date: Wed, 2 Dec 2026 22:43:26 +0530 Message-ID: <20261202171328.805150-1-agab0323@gmail.com> X-Mailer: git-send-email 2.56.0 X-Mailing-List: git@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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