parse-options: make OPT_ARGUMENT() more useful
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 14 Mar 2019 11:25:04 +0000 (04:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Mar 2019 02:44:14 +0000 (11:44 +0900)
`OPT_ARGUMENT()` is intended to keep the specified long option in `argv`
and not to do anything else.

However, it would make a lot of sense for the caller to know whether
this option was seen at all or not. For example, we want to teach `git
difftool` to work outside of any Git worktree, but only when
`--no-index` was specified.

Note: nothing in Git uses OPT_ARGUMENT(). Even worse, looking through
the commit history, one can easily see that nothing even
ever used it, apart from the regression test.

So not only do we make `OPT_ARGUMENT()` more useful, we are also about
to introduce its first real user!

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found