git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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/
Previous: Johannes SchindelinNext: Stefan Beller
Message 8 of 10 in “status: be prepared for not-yet-started interactive rebase”
  1. status: be prepared for not-yet-started interactive rebaseJohannes Schindelin, Jan 22, 2016
  2. Matthieu MoyJan 22, 2016
  3. Johannes SchindelinJan 22, 2016
  4. Junio C HamanoJan 22, 2016
  5. Johannes SchindelinJan 22, 2016
  6. 0/1 Let `git status` handle a not-yet-started `rebase -i` gracefullyJohannes Schindelin, Jan 26, 2017
  7. 1/1 status: be prepared for not-yet-started interactive rebaseJohannes Schindelin, Jan 26, 2017
  8. Matthieu MoyJan 26, 2017
  9. Stefan BellerJan 26, 2017
  10. Johannes SchindelinJan 27, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.