Skip to content

Commit 6e67619

Browse files
committed
Merge branch 'jn/parse-options-extra'
* jn/parse-options-extra: update-index: migrate to parse-options API setup: save prefix (original cwd relative to toplevel) in startup_info parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTION parse-options: allow git commands to invent new option types parse-options: never suppress arghelp if LITERAL_ARGHELP is set parse-options: do not infer PARSE_OPT_NOARG from option type parse-options: sanity check PARSE_OPT_NOARG flag parse-options: move NODASH sanity checks to parse_options_check parse-options: clearer reporting of API misuse parse-options: Don't call parse_options_check() so much
2 parents 47bfb3d + 309be81 commit 6e67619

File tree

7 files changed

+303
-198
lines changed

7 files changed

+303
-198
lines changed

builtin/blame.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,8 +2325,8 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
23252325
save_commit_buffer = 0;
23262326
dashdash_pos = 0;
23272327

2328-
parse_options_start(&ctx, argc, argv, prefix, PARSE_OPT_KEEP_DASHDASH |
2329-
PARSE_OPT_KEEP_ARGV0);
2328+
parse_options_start(&ctx, argc, argv, prefix, options,
2329+
PARSE_OPT_KEEP_DASHDASH | PARSE_OPT_KEEP_ARGV0);
23302330
for (;;) {
23312331
switch (parse_options_step(&ctx, options, blame_opt_usage)) {
23322332
case PARSE_OPT_HELP:

builtin/shortlog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix)
268268
git_config(git_default_config, NULL);
269269
shortlog_init(&log);
270270
init_revisions(&rev, prefix);
271-
parse_options_start(&ctx, argc, argv, prefix, PARSE_OPT_KEEP_DASHDASH |
272-
PARSE_OPT_KEEP_ARGV0);
271+
parse_options_start(&ctx, argc, argv, prefix, options,
272+
PARSE_OPT_KEEP_DASHDASH | PARSE_OPT_KEEP_ARGV0);
273273

274274
for (;;) {
275275
switch (parse_options_step(&ctx, options, shortlog_usage)) {

0 commit comments

Comments
 (0)