[BUG] 'git ls-files --no-exclude' segfault & co
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Aug 6, 2018, 16:07 UTC
- Message-ID
- <CAM0VKj=DDOPDxo_xDvhk2-HUPHfkUcLQTimqmY31yjq5eZiM2Q@mail.gmail.com>
'git ls-files' has the options '--exclude', '--exclude-from', '--exclude-per-directory', and '--exclude-standard', which all work fine. However, it also allows the negated version of all these four options, and they definitely don't work very well:
$ git ls-files --no-exclude Segmentation fault $ git ls-files --no-exclude-from warning: unable to access '(null)': Bad address fatal: cannot use (null) as an exclude file
And '--no-exclude-standard' has the same effect as '--exclude-standard', because its parseopt callback function option_parse_exclude_standard() doesn't bother to look at its 'unset' parameter.