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

Re: [PATCH] status: show branch name if possible in in-progress info

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jan 29, 2013, 12:31 UTC
Message-ID
<vpqy5fcrwzq.fsf@grenoble-inp.fr>
In-Reply-To
<1359461450-24456-1-git-send-email-pclouds@gmail.com>
I like the idea.
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 10 quoted lines
> diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh
> index b3f6eb9..096ba6f 100755
> --- a/t/t7512-status-help.sh
> +++ b/t/t7512-status-help.sh
> @@ -76,7 +76,7 @@ test_expect_success 'status when rebase in progress before resolving conflicts'
>  	test_must_fail git rebase HEAD^ --onto HEAD^^ &&
>  	cat >expected <<-\EOF &&
>  	# Not currently on any branch.
> -	# You are currently rebasing.
> +	# You are currently rebasing '\''rebase_conflicts'\''.
Perhaps "rebasing *branch* 'rebase_conflicts'"
Or even "rebasing branch 'rebase_conflicts' on <sha1sum>"
?
Show 9 quoted lines
> @@ -923,7 +947,7 @@ static void show_bisect_in_progress(struct wt_status *s,
>  				struct wt_status_state *state,
>  				const char *color)
>  {
> -	status_printf_ln(s, color, _("You are currently bisecting."));
> +	status_printf_ln(s, color, _("You are currently bisecting '%s'."), state->branch);
>  	if (advice_status_hints)
>  		status_printf_ln(s, color,
>  			_("  (use \"git bisect reset\" to get back to the original branch)"));

In the "rebase" case, you test state->branch for null-ness. Don't you need the same test here? (What happens if you start a bisect from a detached HEAD state?)

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Nguyễn Thái Ngọc DuyNext: Duy Nguyen
Message 2 of 12 in “status: show branch name if possible in in-progress info”
  1. status: show branch name if possible in in-progress infoNguyễn Thái Ngọc Duy, Jan 29, 2013
  2. Matthieu MoyJan 29, 2013
  3. Duy NguyenJan 29, 2013
  4. Matthieu MoyJan 29, 2013
  5. Junio C HamanoJan 29, 2013
  6. status: show the branch name if possible in in-progress infoNguyễn Thái Ngọc Duy, Jan 29, 2013
  7. Jonathan NiederJan 29, 2013
  8. Duy NguyenJan 30, 2013
  9. status: show the branch name if possible in in-progress infoNguyễn Thái Ngọc Duy, Feb 3, 2013
  10. Jonathan NiederFeb 5, 2013
  11. Duy NguyenFeb 5, 2013
  12. Junio C HamanoFeb 5, 2013

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.