Article View: linux.kernel.git
Article #2450Re: [Outreachy PATCH v4 1/3] parse-options: answer --git-completion-helper before command runs
From: Tanga Joris
Date: Thu, 05 Nov 2026 19:14
Date: Thu, 05 Nov 2026 19:14
41 lines
13203 bytes
13203 bytes
Hi Junio, Thank you for looking into my revised patch. On Thu, 5 Nov 2026 at 18:32, Junio C Hamano <gitster@pobox.com> wrote: > "wait for input" and "leave files behind" are peculiarity that > exists only in fast-import, that is shared with nobody else, no? > The fact that it does not call parse_options() until it gets an > input, and that you want it to react to "-h", is what makes this > function useful in that context. I agree that my comment focuses too much on the peculiarity associated with fast-import. > I think what you want to describe is > > - A program that uses parse_options() early in the program has no > reason to use this function. > > - If there is a reason why you may have to react to help request > from the command line before the control hits parse_options(), > you may want to call this function to react to such a request. Yes, that is what the text should have described. I will rewrite the comment to mention that the function is not needed by programs which call parse_options() early. I'll also add that its purpose is to answer help requests (-h and --help-all) or the completion helper before parse_options() runs. The new comment would read: /* * Programs that call parse_options() early do not need this function. * If your program has to answer help requests (-h and --help-all) or * the completion helper before parse_options() runs, call this * function to answer them. */ Thanks, Tanga
Technical Details
Message-ID:
<CAKrRMNpJhpqqAdELav+cw8=ScxVk6bLDJSa6Rq+Q4pyRg6uZdw@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74591-linux-kernel-git=dewy.ruReferences:
<20261029231621.48958-1-tangajoris@gmail.com> <20261105003914.708836-1-tangajoris@gmail.com> <xmqq8q37xpi8.fsf@gitster.g>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-74591-linux-kernel-git=dewy.ru
From: tangajoris@gmail.com (Tanga Joris)
Newsgroups: linux.kernel.git
Subject: Re: [Outreachy PATCH v4 1/3] parse-options: answer
--git-completion-helper before command runs
Date: Thu, 5 Nov 2026 22:14:47 +0300
Organization: Usenet Network
Message-ID: <CAKrRMNpJhpqqAdELav+cw8=ScxVk6bLDJSa6Rq+Q4pyRg6uZdw@mail.gmail.com>
References: <20261029231621.48958-1-tangajoris@gmail.com> <20261105003914.708836-1-tangajoris@gmail.com>
<xmqq8q37xpi8.fsf@gitster.g>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: usenet.network;
logging-data="3708897"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:tKN9LmLd/aTaM51OAuh81kQvTOw= sha256:qqkMLFKzSC+993rPzAwjuCClEKIUdn6S5yueY4nQyV0=
sha1:xhFzz0q0s5Zxf+Wsj48Uj2CF4Bw= sha256:eFp+T5lbuNVh5rGljBxlS85YRgcEHYS6aSxSCWHe9XM=
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 33F3B113075; Thu, 5 Nov 2026 22:18:48 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 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] 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 GLtWbIRZpVZp;
Thu, 5 Nov 2026 22:18:44 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-74591-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id 3D57F113072; Thu, 5 Nov 2026 22:18:33 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id 578262836E; Thu, 5 Nov 2026 19:15:27 +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=1793906126;
b=Bc4Q6i/Ks3TdkpquWWKpz0dYWpINaXE7XvnWMpJJwNAqVGHV06zSMNHaJRTD1OUfTVeY
e8x4Gshzi4GjSm4Wv5XLOTqIucU6IcpaDSOtl5RGMYihxTNRsJo/YRBSvSg6ucqKwdxgQ
6eHxoLd3fXnlAwUOoNUO6q+tMmXylv77CssAF2bnunlWXSOMPDnXpRaUVKJbWV9ef/PS9
JE8FJStIePJCY4+jMMr3rJs+A+0DH7ZjqjOzeo9ybNSRoVim5N6rd7BTqlY9VDZ/z2okg
2HmFnfD6Kv5Zc3+wpI++XDjR16b/PG4LOMUBXWjbXBdEc2YF3h5CiKitUEy6UN+my6A==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793906126;
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;
bh=UdEoOvWoO4DuIDuWH/FV9IhK7vlDtHn3ih6iZlQqR98=;
b=c7E6OU5jYKNLqD+7vH4YeoFZZFMCIf4xic7kjBkJJ5zdEV7Xf376yl7HOvc0CBglkW2E
YOcD6mQYh1tXWwJgpBH16pA65Yc6twRxIOiK4kG8P8+nLA1t1d+bI+UAGvVIoc45p8nY6
/zeHMa+YnbElvmWvEH5jXALIkMJWRy/8wnoVZ8qz46eSj5OFzpOmCthKNzyrUdrN8IKf2
iQymDV4WOCF46zfOd260l1JcbHj+QcNpCf4kP/EyeClWaJkxIHeDx6k8LLTzAhbFSHK5a
+EcIsnFkyqroxZTL/g+RdAUDQu2XM/3am8b2dy3ci/YEgKBEleUdOB7TES58S23w65Q==
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=l5beoqTR;
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 9982F606A333;
Thu, 5 Nov 2026 19:15:26 +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=20260707 header.b=l5beoqTR
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.161.47
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793906125;
b=CgG4eS3Pk0iaJbNpX6x/D39PtfA7m+qSvjTi/8u1pdopRIZ9q+NGVhN5oeoSNBGzl1WT
pMrkdqTwOdy897MiwtD1Kw/XcBKroozN4aOQIlP1DuaPjgQt2fVa78zJA0Qo8eNu79ba5
IYuOMnasYudEAT3abkY3n9M+e0NEQrS0SvFWS/HGoNv9JzD2DY4V+wtP8ynyUHVwMRSnT
JVpxhslaN+gaxnKLi1GLnSXb0D1eCeZtxck4EZE6qPRv7M3/vq4T+TewmFKofANY8iPYN
ehNZyLUnDfKHFDaVo8LA6faSuIjE3BtwSJ/Ojs047UMXSP0YRuFtKTh9m8CBB8+eFdg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793906125;
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;
bh=UdEoOvWoO4DuIDuWH/FV9IhK7vlDtHn3ih6iZlQqR98=;
b=NSH5jd2F5GRnbPxWjpilUJ10rrgrZVowKIKYItNtkXjEqIK9joxbbcCv/JB+ATKy97K1
XOY52PjYpOin0PqlAU2yLOMAAYC4P8FMihC9xFyZ+5uA6Yre0X15hpf4dSsADsYhpLDTu
uBZ1AzZiGnnbWBFDeuhCwyiFMAb+a4mpiyRUlJMvocrcfSDu1pIJTuUPN4wFli2/VQfYG
mG95fW2PI7dTNGBgijgXEiXgkayBOvKDPdF5+F7BFygGwGF9QaY9aXi5U6pC4u65vPPMm
CkYg5UDJvfaaeAhZjlGdHxhu4rPql+mZ9Ik8x5lr5V/O6MHGVJklowXFn+NB0wqy+Ug==
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=l5beoqTR;
arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.161.47
X-Received: from mail-oo1-f47.google.com (mail-oo1-f47.google.com [209.85.161.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 63CD2606A328
for <git@vger.kernel.org>; Thu, 5 Nov 2026 19:15:25 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 63CD2606A328
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-oo1-f47.google.com with SMTP id 006d021491bc7-6d290b10a35so1054740eaf.2
for <git@vger.kernel.org>; Thu, 05 Nov 2026 11:15:25 -0800 (PST)
X-ARC-Seal: i=1; a=rsa-sha256; t=1793906124; cv=none;
d=google.com; s=arc-20260327;
b=kdxcQ0ehFfJ2XM5iM5wLwRWvLbcCGkDI/FpMUUm54GXwi6RYeacwAymfvsXYK8l+Jn
77LTqIe39x7/s3jLQsY0RTxZO3lI8fvHWFKijUFzEF2bwL7etcS7DF4ZqR1fnfY2ImQi
RztMumj4T1d6SNCsUt1/Bf+VH/kVB65f1LmbpNj7UD4F/C/RqpmJso21I5XXL9/tTkPI
HRmBYuiTiV2CdoB1FKwN6k+c4/2aLtYTGt8oJkeqgomfIa5y4jYh+xlW8tuYYRMXAy6J
PdoUgq1e5WSBXZCQR8E24G3vkBf9qRS5dKEG/2umpISByd0DH/35W5W1kDaxYzQjkauL
CgUA==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:dkim-signature;
bh=UdEoOvWoO4DuIDuWH/FV9IhK7vlDtHn3ih6iZlQqR98=;
fh=GRlzCOJ9DXBM0i6A/iVtq5dr8FzCZ9cO/i89g4/OYzQ=;
b=Z58D8Z4KaYfQbKMFOY3UgiNKhomaHSPUlvAB1/txGWYYUOGcdQ1KUwTB+lGQ3XsD4X
0pOyUs4bhjNI0j14JEkx8n4J+3/zmLWZfD+ItHdKLA2bo7/tgdtrFicreCrxh8g6qJo0
/mHIe6Vdw7iENPem+iod4SyvTtMXCPTn0WynDFZMtBUGV9dGzk9QIPcLTWi4fN1ZFmSm
BQcamMi+N0SoxtydHWTuSxnTrj1QPaauu3xC1hHjmXIyKDur5z2/98eTUnJE1/uJPi5x
k2DH5JA8AJR8cdGwZsxBuI4bWZ/2pFMsmm5DMVDUvcd3bE7rgxSNRyETzgytbOU9O0AN
r2sQ==;
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=1793906124; x=1794510924; darn=vger.kernel.org;
h=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=UdEoOvWoO4DuIDuWH/FV9IhK7vlDtHn3ih6iZlQqR98=;
b=l5beoqTR7j6S75yLezTWpxNVLTVpCot1Mx/tmyy6IBu+AW8zVjCT6ZXt2UdFw+ag6G
cJYI/C1JD6v/Vk2CRV94xD2FcWlU9RbE4sN2rkZl9lC2OnQ8oXozUHUFxMQCMhAMCnu7
CehlrDRuu8GvmeobGIOTHrHJ6iFPIGJABho2Twe3uP9ngX1Aq8Xzirj12F4IAx9fc/DH
m5DWRd28b8ST5na8JMBRb0oSjMlIGI7xHH5K25hXvy6Fbg/gqf1KjOCHlTvuF5wuTo7G
98O32cMR1qOvS7lPV28skd5NjVRYrLh03zJ+EpcVglNdIR27Zdu00NOlCvwdFijVl1uE
U1uw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793906124; x=1794510924;
h=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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mOENYpMDk7vQsDiGJ8qBSUa4o5pMjVSi4FoFz8jRzDEm
jNw
X-Received: by 2002:a05:6820:4481:b0:6f8:a519:d930 with SMTP id
006d021491bc7-716e78b499fmr389583eaf.34.1793906124278; Thu, 05 Nov 2026
11:15:24 -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: <xmqq8q37xpi8.fsf@gitster.g>
X-Gm-Features: AclHuK94n81pn_0iKqa5x00CuNIaL8aSvLOBDE4PNZRCyxj8ce7PhkuxyyMsnC4
X-Cc: git@vger.kernel.org, l.s.r@web.de, christian.couder@gmail.com,
siddharthasthana31@gmail.com, kaartic.sivaraam@gmail.com,
usmanakinyemi202@gmail.com, herroyalpriestess@gmail.com