Re: [PATCH 6/9] am: move advice.amWorkDir parsing back to advice.c
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 11, 2018, 22:42 UTC
- Message-ID
- <CAPig+cSE_efq71V5ZskORgX5teP5FmUBYB49EdVrveSU8qxnVg@mail.gmail.com>
- In-Reply-To
- <20180510141927.23590-7-pclouds@gmail.com>
On Thu, May 10, 2018 at 10:19 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
> 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> > --- > diff --git a/builtin/am.c b/builtin/am.c > @@ -1827,15 +1827,12 @@ static void am_run(struct am_state *state, int
resume)
> if (apply_status) {
> - int advice_amworkdir = 1;Nit: Maybe also delete the blank line following the removed declaration...
> printf_ln(_("Patch failed at %s %.*s"),msgnum(state),
> linelen(state->msg), state->msg);