<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/parse-options.h, branch v2.22.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.22.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.22.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-05-19T07:45:34Z</updated>
<entry>
<title>Merge branch 'js/parseopt-unknown-cb-returns-an-enum'</title>
<updated>2019-05-19T07:45:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-19T07:45:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7a09f5f1b6b506e31d2f8e10ec09a7d2977317aa'/>
<id>urn:sha1:7a09f5f1b6b506e31d2f8e10ec09a7d2977317aa</id>
<content type='text'>
Code clean-up.

* js/parseopt-unknown-cb-returns-an-enum:
  parse-options: adjust `parse_opt_unknown_cb()`s declared return type
</content>
</entry>
<entry>
<title>Merge branch 'nd/parse-options-aliases'</title>
<updated>2019-05-19T07:45:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-19T07:45:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2cfab6087790ceeb81eb91eeb1300500cfa4c948'/>
<id>urn:sha1:2cfab6087790ceeb81eb91eeb1300500cfa4c948</id>
<content type='text'>
Attempt to use an abbreviated option in "git clone --recurs" is
responded by a request to disambiguate between --recursive and
--recurse-submodules, which is bad because these two are synonyms.
The parse-options API has been extended to define such synonyms
more easily and not produce an unnecessary failure.

* nd/parse-options-aliases:
  parse-options: don't emit "ambiguous option" for aliases
</content>
</entry>
<entry>
<title>parse-options: adjust `parse_opt_unknown_cb()`s declared return type</title>
<updated>2019-05-14T07:42:31Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2019-05-13T22:43:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=567fce1e10e77b39203504ad36a273d447ec031a'/>
<id>urn:sha1:567fce1e10e77b39203504ad36a273d447ec031a</id>
<content type='text'>
In f41179f16ba2 (parse-options: avoid magic return codes, 2019-01-27),
the signature of the low-level parse-opt callback function was changed
to return an `enum`.

And while the implementations were changed, one declaration was left
unchanged, still claiming to return `int`.

This can potentially lead to problems, as compilers are free to choose
any integral type for an `enum` as long as it can represent all declared
values.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pw/rebase-i-internal'</title>
<updated>2019-05-13T14:50:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-13T14:50:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7ba06bc3d026cee54437db5cfddfffe7b4d7a187'/>
<id>urn:sha1:7ba06bc3d026cee54437db5cfddfffe7b4d7a187</id>
<content type='text'>
The internal implementation of "git rebase -i" has been updated to
avoid forking a separate "rebase--interactive" process.

* pw/rebase-i-internal:
  rebase -i: run without forking rebase--interactive
  rebase: use a common action enum
  rebase -i: use struct rebase_options in do_interactive_rebase()
  rebase -i: use struct rebase_options to parse args
  rebase -i: use struct object_id for squash_onto
  rebase -i: use struct commit when parsing options
  rebase -i: remove duplication
  rebase -i: combine rebase--interactive.c with rebase.c
  rebase: use OPT_RERERE_AUTOUPDATE()
  rebase: rename write_basic_state()
  rebase: don't translate trace strings
  sequencer: always discard index after checkout
</content>
</entry>
<entry>
<title>Merge branch 'dl/merge-cleanup-scissors-fix'</title>
<updated>2019-05-08T15:37:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-08T15:37:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b877cb4a7ec2fafd03b6a3a70c26370744a32c1b'/>
<id>urn:sha1:b877cb4a7ec2fafd03b6a3a70c26370744a32c1b</id>
<content type='text'>
The list of conflicted paths shown in the editor while concluding a
conflicted merge was shown above the scissors line when the
clean-up mode is set to "scissors", even though it was commented
out just like the list of updated paths and other information to
help the user explain the merge better.

* dl/merge-cleanup-scissors-fix:
  cherry-pick/revert: add scissors line on merge conflict
  sequencer.c: save and restore cleanup mode
  merge: add scissors line on merge conflict
  merge: cleanup messages like commit
  parse-options.h: extract common --cleanup option
  commit: extract cleanup_mode functions to sequencer
  t7502: clean up style
  t7604: clean up style
  t3507: clean up style
  t7600: clean up style
</content>
</entry>
<entry>
<title>parse-options: don't emit "ambiguous option" for aliases</title>
<updated>2019-05-07T03:23:22Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-04-29T10:05:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5c387428f10c27c24d3adb890cd466e2300518fa'/>
<id>urn:sha1:5c387428f10c27c24d3adb890cd466e2300518fa</id>
<content type='text'>
Change the option parsing machinery so that e.g. "clone --recurs ..."
doesn't error out because "clone" understands both "--recursive" and
"--recurse-submodules" to mean the same thing.

Initially "clone" just understood --recursive until the
--recurses-submodules alias was added in ccdd3da652 ("clone: Add the
--recurse-submodules option as alias for --recursive",
2010-11-04). Since bb62e0a99f ("clone: teach --recurse-submodules to
optionally take a pathspec", 2017-03-17) the longer form has been
promoted to the default.

But due to the way the options parsing machinery works this resulted
in the rather absurd situation of:

    $ git clone --recurs [...]
    error: ambiguous option: recurs (could be --recursive or --recurse-submodules)

Add OPT_ALIAS() to express this link between two or more options and use
it in git-clone. Multiple aliases of an option could be written as

    OPT_ALIAS(0, "alias1", "original-name"),
    OPT_ALIAS(0, "alias2", "original-name"),
    ...

The current implementation is not exactly optimal in this case. But we
can optimize it when it becomes a problem. So far we don't even have two
aliases of any option.

A big chunk of code is actually from Junio C Hamano.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/difftool-no-index'</title>
<updated>2019-04-25T07:41:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-25T07:41:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b72e90712eb0e802b232ad4c88460d04279c7111'/>
<id>urn:sha1:b72e90712eb0e802b232ad4c88460d04279c7111</id>
<content type='text'>
"git difftool" can now run outside a repository.

* js/difftool-no-index:
  difftool: allow running outside Git worktrees with --no-index
  parse-options: make OPT_ARGUMENT() more useful
  difftool: remove obsolete (and misleading) comment
</content>
</entry>
<entry>
<title>Merge branch 'nd/diff-parseopt-4'</title>
<updated>2019-04-25T07:41:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-25T07:41:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dcd6a8c09a36a500c4e612a52eba1c6c5e298951'/>
<id>urn:sha1:dcd6a8c09a36a500c4e612a52eba1c6c5e298951</id>
<content type='text'>
Fourth batch to teach the diff machinery to use the parse-options
API.

* nd/diff-parseopt-4:
  am: avoid diff_opt_parse()
  diff --no-index: use parse_options() instead of diff_opt_parse()
  range-diff: use parse_options() instead of diff_opt_parse()
  diff.c: allow --no-color-moved-ws
  diff-parseopt: convert --color-moved-ws
  diff-parseopt: convert --[no-]color-moved
  diff-parseopt: convert --inter-hunk-context
  diff-parseopt: convert --no-prefix
  diff-parseopt: convert --line-prefix
  diff-parseopt: convert --[src|dst]-prefix
  diff-parseopt: convert --[no-]abbrev
  diff-parseopt: convert --diff-filter
  diff-parseopt: convert --find-object
  diff-parseopt: convert -O
  diff-parseopt: convert --pickaxe-all|--pickaxe-regex
  diff-parseopt: convert -S|-G
  diff-parseopt: convert -l
  diff-parseopt: convert -z
  diff-parseopt: convert --ita-[in]visible-in-index
  diff-parseopt: convert --ws-error-highlight
</content>
</entry>
<entry>
<title>rebase -i: use struct object_id for squash_onto</title>
<updated>2019-04-19T08:32:10Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2019-04-17T14:30:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=338985317eb84007f0d08979e751cbf32a375a52'/>
<id>urn:sha1:338985317eb84007f0d08979e751cbf32a375a52</id>
<content type='text'>
More preparation for using `struct rebase_options` in
cmd_rebase__interactive(). Using a string was a hangover from the
scripted version of rebase, update the functions that use `squash_onto`
to take a `sturct object_id`.

Signed-off-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>rebase -i: use struct commit when parsing options</title>
<updated>2019-04-19T08:32:10Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2019-04-17T14:30:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d3488eb893ba53186770181171ee8ebc8100e18'/>
<id>urn:sha1:7d3488eb893ba53186770181171ee8ebc8100e18</id>
<content type='text'>
This is in preparation for using `struct rebase_options` when parsing
options in cmd_rebase__interactive(). Using a string for onto,
restrict_revision and upstream, was a hangover from the scripted version
of rebase. The functions that use these variables are updated to take a
`struct commit`.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
