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

Re: [PATCH v2] branch: show rebase/bisect info when possible instead of "(no branch)"

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Feb 4, 2013, 13:13 UTC
Message-ID
<vpqr4kwmdcs.fsf@grenoble-inp.fr>
In-Reply-To
<7v1ucx83fz.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
>> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>>
>>> --- a/t/t6030-bisect-porcelain.sh
>>> +++ b/t/t6030-bisect-porcelain.sh
>>> @@ -164,7 +164,7 @@ test_expect_success 'bisect start: existing ".git/BISECT_START" not modified if
>>>  	cp .git/BISECT_START saved &&
>>>  	test_must_fail git bisect start $HASH4 foo -- &&
>>>  	git branch > branch.output &&
>>> -	test_i18ngrep "* (no branch)" branch.output > /dev/null &&
>>> +	test_i18ngrep "* (bisecting other)" branch.output > /dev/null &&
[...]
> What does "other" refer to when you start your bisection at a
> detached head?

If I read correctly, the branch name is shown only when the bisection was not started on a detached HEAD:

+ if (!get_sha1_hex(sb.buf, sha1)) + strbuf_addstr(&result, _("(bisecting)")); + else + strbuf_addf(&result, _("(bisecting %s)"), sb.buf);

> I personally think "other" has _no_ value in that message, because
> "(no branch, bisecting)" gives the same amount of information,
> especially because "other" does not say which branch it refers to at
> all.

Just to be sure: "other" here is not a hardcoded message "bisecting other", but an instance of "bisecting <branch-name>" with the branch being called "other".

I think this is very valuable information, and most likely the information you'd be looking for when running "git branch". You're technically on detached HEAD, but morally on some branch, the HEAD being detached only because a bisect is in progress.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 14 in “branch: show (rebasing) or (bisecting) instead of (no branch) when possible”
  1. branch: show (rebasing) or (bisecting) instead of (no branch) when possibleNguyễn Thái Ngọc Duy, Jan 29, 2013
  2. Jonathan NiederJan 29, 2013
  3. branch: show rebase/bisect info when possible instead of "(no branch)"Nguyễn Thái Ngọc Duy, Feb 3, 2013
  4. Matthieu MoyFeb 3, 2013
  5. Junio C HamanoFeb 3, 2013
  6. Junio C HamanoFeb 3, 2013
  7. Matthieu MoyFeb 4, 2013
  8. Junio C HamanoFeb 4, 2013
  9. Duy NguyenFeb 4, 2013
  10. Duy NguyenFeb 4, 2013
  11. branch: show rebase/bisect info when possible instead of "(no branch)"Nguyễn Thái Ngọc Duy, Feb 8, 2013
  12. Junio C HamanoFeb 8, 2013
  13. Duy NguyenFeb 14, 2013
  14. Junio C HamanoFeb 11, 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.