diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-05-26 15:55:27 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-29 07:51:28 +0200 |
commit | 431bb23a271ef45e22ad4a2def2e0ba0a1954e98 (patch) | |
tree | a07933e455138fb49c7b35f63bd2816dd7cc06c3 /builtin/am.c | |
parent | advice: keep config name in camelCase in advice_config[] (diff) | |
download | git-431bb23a271ef45e22ad4a2def2e0ba0a1954e98.tar.xz git-431bb23a271ef45e22ad4a2def2e0ba0a1954e98.zip |
am: move advice.amWorkDir parsing back to advice.c
The only benefit from this move (apart from cleaner code) is that
advice.amWorkDir should now show up in `git help --config`. There
should be no regression since advice config is always read by the
git_default_config().
While at there, use advise() like other code. We now get "hint: "
prefix and the output is stderr instead of stdout (which is also the
reason for the test update because stderr is checked in a following
test and the extra advice can fail it).
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/am.c')
-rw-r--r-- | builtin/am.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/builtin/am.c b/builtin/am.c index d834f9e62b..93130aaa35 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -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); } |