Re: [PATCH] git-archive: accept --owner and --group like GNU tar
- From
René Scharfe <l.s.r@web.de>
- Date
- Jan 4, 2018, 16:59 UTC
- Message-ID
- <f7654cd9-2cd0-0775-3b10-8e3dc1a66dae@web.de>
- In-Reply-To
- <5A4D9089.3050209@hiroshima-u.ac.jp>
Am 04.01.2018 um 03:25 schrieb suzuki toshiya:
Show 5 quoted lines
> Taking a glance on parse-options.h, I could not find the > existing class collecting the operands as an array (or > linked list) from multiple "--xxx=yyy" options. Similar > things might be the collecting the pathnames to pathspec > structure. Should I write something with OPTION_CALLBACK?
There is OPT_STRING_LIST; Documentation/technical/api-parse-options.txt says:
`OPT_STRING_LIST(short, long, &struct string_list, arg_str, description)`::
Introduce an option with string argument.
The string argument is stored as an element in `string_list`.
Use of `--no-option` will clear the list of preceding values.I don't know if it's a good idea, but perhaps we don't even need a new option. We could change how pathspecs of untracked files are handled: Instead of aborting we could include them in the archive. (Sounds like the simplest possible interface, but may have practical problems.)
René