Re: [PATCH v2 1/1] status: be prepared for not-yet-started interactive rebase
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jan 26, 2017, 18:04 UTC
- Message-ID
- <vpq7f5hpujm.fsf@anie.imag.fr>
- In-Reply-To
- <alpine.DEB.2.20.1701261708370.3469@virtualbox>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
Show 11 quoted lines
> Some developers might want to call `git status` in a working > directory where they just started an interactive rebase, but the > edit script is still opened in the editor. > > Let's show a meaningful message in such cases. > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> > --- > t/t7512-status-help.sh | 19 +++++++++++++++++++ > wt-status.c | 14 ++++++++++---- > 2 files changed, 29 insertions(+), 4 deletions(-)
The patch looks good to me.
Show 10 quoted lines
> @@ -1166,8 +1170,10 @@ static void show_rebase_information(struct wt_status *s,
> struct string_list yet_to_do = STRING_LIST_INIT_DUP;
>
> read_rebase_todolist("rebase-merge/done", &have_done);
> - read_rebase_todolist("rebase-merge/git-rebase-todo", &yet_to_do);
> -
> + if (read_rebase_todolist("rebase-merge/git-rebase-todo",
> + &yet_to_do))
> + status_printf_ln(s, color,
> + _("git-rebase-todo is missing."));I first was surprised not to see this "git-rebase-todo" in the output of status, but the testcase tests a missing 'done', not a missing todo, so it's normal.
Thanks,
-- Matthieu Moy http://www-verimag.imag.fr/~moy/