Merge branch 'nd/complete-config-vars'

Continuing with the idea to programatically enumerate various
pieces of data required for command line completion, teach the
codebase to report the list of configuration variables
subcommands care about to help complete them.

* nd/complete-config-vars:
  completion: complete general config vars in two steps
  log-tree: allow to customize 'grafted' color
  completion: support case-insensitive config vars
  completion: keep other config var completion in camelCase
  completion: drop the hard coded list of config vars
  am: move advice.amWorkDir parsing back to advice.c
  advice: keep config name in camelCase in advice_config[]
  fsck: produce camelCase config key names
  help: add --config to list all available config
  fsck: factor out msg_id_info[] lazy initialization code
  grep: keep all colors in an array
  Add and use generic name->id mapping code for color slot parsing
This commit is contained in:
Junio C Hamano
2018-06-25 13:22:38 -07:00
21 changed files with 445 additions and 553 deletions

View File

@ -1827,15 +1827,11 @@ static void am_run(struct am_state *state, int resume)
}
if (apply_status) {
int advice_amworkdir = 1;
printf_ln(_("Patch failed at %s %.*s"), msgnum(state),
linelen(state->msg), state->msg);
git_config_get_bool("advice.amworkdir", &advice_amworkdir);
if (advice_amworkdir)
printf_ln(_("Use 'git am --show-current-patch' to see the failed patch"));
advise(_("Use 'git am --show-current-patch' to see the failed patch"));
die_user_resolve(state);
}