update-index: migrate to parse-options API
Get series with b4
b4 am 20101024081316.GA29630@burratinoVersions newest first
- v1 Latest4 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | parse-options: allow git commands to invent new option typesparse-options.c parse-options.h | +12 | 2 replies | |
| 2/4 | parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTIONparse-options.c parse-options.h | +3 | 0 replies | |
| 3/4 | setup: save prefix (original cwd relative to toplevel) in startup_infocache.h setup.c | +4 | 0 replies | |
| 4/4 | update-index: migrate to parse-options APIbuiltin/ | +240 | 2 replies |
Reviews trailers per patch
None of the 4 patches has a Reviewed-by or Acked-by.
| Patch | Stephen Boyd |
|---|---|
| Series | Improved-by Noticed-by |
| 1/4 | |
| 2/4 | |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC/PATCH 0/4] update-index: migrate to parse-options API
Quoted 3 lines · Jonathan Nieder
Here's a helper to make it easier for commands that use parse-options to adopt that nicer behavior. It writes its output to stdout, so it should only be used to be used to handle the -h option.
Alas, "git update-index" does not use parse-options yet. But that is easily enough changed...
Patch 1 introduces an OPTION_LOWLEVEL_CALLBACK backdoor to parse-options, so new option types (like the three-argument type used by update-index --cacheinfo) can be supported without tempting inventors of other commands through mention in the public API.
Patch 2 is a toy patch I previously send to Bo. It makes parse_option_step() distinguish between stops due to end of options and stops due to appearance of a nonoption; update-index benefits from something like this because it needs to deal with filename parameters as they appear.
Patch 3 converts update-index to parse-options. The commit message mentions some potential simplifications.
All three patches ought to introduce new tests, but none do. I hope that does not hinder reading them too much. Thoughts?
Jonathan Nieder (3):
parse-options: allow git commands to invent new option types
parse-options: make resuming easier after
PARSE_OPT_STOP_AT_NON_OPTION
update-index: migrate to parse-options API
Nguyễn Thái Ngọc Duy (1):
setup: save prefix (original cwd relative to toplevel) in
startup_info
builtin/update-index.c | 389 +++++++++++++++++++++++++++++------------------ cache.h | 1 + parse-options.c | 9 +- parse-options.h | 10 ++ setup.c | 4 +- 5 files changed, 259 insertions(+), 154 deletions(-)
Signature · 1 line
1.7.2.3