<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/parse-options.c, branch main</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2026-03-10T21:23:19Z</updated>
<entry>
<title>Merge branch 'rs/parse-options-duplicated-long-options'</title>
<updated>2026-03-10T21:23:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-03-10T21:23:18Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=6953f24e4040b57d461a755fac297f272095ade7'/>
<id>urn:sha1:6953f24e4040b57d461a755fac297f272095ade7</id>
<content type='text'>
The parse-options API learned to notice an options[] array with
duplicated long options.

* rs/parse-options-duplicated-long-options:
  parseopt: check for duplicate long names and numerical options
  pack-objects: remove duplicate --stdin-packs definition
</content>
</entry>
<entry>
<title>parseopt: check for duplicate long names and numerical options</title>
<updated>2026-03-02T15:39:01Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2026-02-28T09:19:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=237e520d81201eee609cf21e24f1c7ac6719ec8a'/>
<id>urn:sha1:237e520d81201eee609cf21e24f1c7ac6719ec8a</id>
<content type='text'>
We already check for duplicate short names.  Check for and report
duplicate long names and numerical options as well.

Perform the slightly expensive string duplicate check only when showing
the usage to keep the cost of normal invocations low.  t0012-help.sh
covers it.

Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'dk/parseopt-optional-filename-fixes'</title>
<updated>2025-11-06T23:17:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-06T23:17:01Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4badef0c3503dc29059d678abba7fac0f042bc84'/>
<id>urn:sha1:4badef0c3503dc29059d678abba7fac0f042bc84</id>
<content type='text'>
A recently added configuration variable and command line option
syntax ":(optional)" for values that are of filename type
inconsistently behaved on an empty file (configuration took it
happily, while the command line option pretended as if it did not
exist), which has been corrected.

* dk/parseopt-optional-filename-fixes:
  parseopt: remove unreachable code
  parseopt: restore const qualifier to parsed filename
  config: use boolean type for a simple flag
  parseopt: use boolean type for a simple flag
  doc: clarify command equivalence comment
  parseopt: fix :(optional) at command line to only ignore missing files
</content>
</entry>
<entry>
<title>parseopt: remove unreachable code</title>
<updated>2025-11-04T17:36:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-04T17:34:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a2584d04344b93610ee9e958d477d743380fc8d7'/>
<id>urn:sha1:a2584d04344b93610ee9e958d477d743380fc8d7</id>
<content type='text'>
At this point in the code after running skip_prefix() on the
variable and receiving the result in the same variable, the contents
of the variable can never be NULL.  The function either (1) updates
the variable to point at a later part of the string it originally
pointed at, or (2) leaves it intact if the string does not have the
prefix.  (1) will never make the variable NULL, and (2) cannot be
the source of NULL, because the variable cannot be NULL before
calling skip_prefix(), which would die immediately by dereferencing
the NULL pointer in that case.

Helped-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parseopt: restore const qualifier to parsed filename</title>
<updated>2025-11-04T17:25:52Z</updated>
<author>
<name>D. Ben Knoble</name>
<email>ben.knoble+github@gmail.com</email>
</author>
<published>2025-11-02T16:17:48Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=383e5e1c4bfa604bcd479100258b4ff354dbaabb'/>
<id>urn:sha1:383e5e1c4bfa604bcd479100258b4ff354dbaabb</id>
<content type='text'>
This was unintentionally dropped in ccfcaf399f (parseopt: values of
pathname type can be prefixed with :(optional), 2025-09-28). Notably,
continue dropping the const qualifier when free'ing value; see
4049b9cfc0 (fix const issues with some functions, 2007-10-16) or
83838d5c1b (cast variable in call to free() in builtin/diff.c and
submodule.c, 2011-11-06) for more details on why.

Suggested-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: D. Ben Knoble &lt;ben.knoble+github@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parseopt: use boolean type for a simple flag</title>
<updated>2025-11-04T17:25:51Z</updated>
<author>
<name>D. Ben Knoble</name>
<email>ben.knoble+github@gmail.com</email>
</author>
<published>2025-11-02T16:17:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4da5bebc17518bace2a15484f345c3494c120135'/>
<id>urn:sha1:4da5bebc17518bace2a15484f345c3494c120135</id>
<content type='text'>
Suggested-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: D. Ben Knoble &lt;ben.knoble+github@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parseopt: fix :(optional) at command line to only ignore missing files</title>
<updated>2025-11-04T17:25:51Z</updated>
<author>
<name>D. Ben Knoble</name>
<email>ben.knoble+github@gmail.com</email>
</author>
<published>2025-11-02T16:17:44Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=aece3bc266d3edf3a2710799876ce538561b5fba'/>
<id>urn:sha1:aece3bc266d3edf3a2710799876ce538561b5fba</id>
<content type='text'>
Unlike the configuration option magic, the parseopt code also ignores
empty files: compare implementations from ccfcaf399f (parseopt: values
of pathname type can be prefixed with :(optional), 2025-09-28) and
749d6d166d (config: values of pathname type can be prefixed with
:(optional), 2025-09-28).

Unify the 2 by not ignoring empty files, which is less surprising and
the intended semantics from the first patch for config.

Suggested-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: D. Ben Knoble &lt;ben.knoble+github@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/optional-path'</title>
<updated>2025-10-14T19:56:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-10-14T19:56:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=44dee53a303ad91305158bb1e2d9a8704b300c15'/>
<id>urn:sha1:44dee53a303ad91305158bb1e2d9a8704b300c15</id>
<content type='text'>
Configuration variables that take a pathname as a value
(e.g. blame.ignorerevsfile) can be marked as optional by prefixing
":(optoinal)" before its value.

* jc/optional-path:
  parseopt: values of pathname type can be prefixed with :(optional)
  config: values of pathname type can be prefixed with :(optional)
  t7500: fix GIT_EDITOR shell snippet
  t7500: make each piece more independent
</content>
</entry>
<entry>
<title>parseopt: values of pathname type can be prefixed with :(optional)</title>
<updated>2025-10-07T17:05:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-09-28T21:29:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=ccfcaf399ffcc91553395a8de8e833e7685e7cc2'/>
<id>urn:sha1:ccfcaf399ffcc91553395a8de8e833e7685e7cc2</id>
<content type='text'>
In the previous step, we introduced an optional filename that can be
given to a configuration variable, and nullify the fact that such a
configuration setting even existed if the named path is missing or
empty.

Let's do the same for command line options that name a pathname.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: D. Ben Knoble &lt;ben.knoble+github@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'dk/help-all'</title>
<updated>2025-08-25T21:22:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-08-25T21:22:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a3c6459ab6610d93da8c95000d0ffc803ce39892'/>
<id>urn:sha1:a3c6459ab6610d93da8c95000d0ffc803ce39892</id>
<content type='text'>
"git cmd --help-all" now works outside repositories.

* dk/help-all:
  builtin: also setup gently for --help-all
  parse-options: refactor flags for usage_with_options_internal
</content>
</entry>
</feed>
