git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Rubén Justo" <rjusto@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH v2] status: fix branch shown when not only bisecting
Date: Mon, 16 Oct 2023 15:08:32 -0700	[thread overview]
Message-ID: <xmqqil76kyov.fsf@gitster.g> (raw)
In-Reply-To: <2e24ca9b-9c5f-f4df-b9f8-6574a714dfb2@gmail.com> ("Rubén Justo"'s message of "Sat, 9 Sep 2023 22:12:47 +0200")

Rubén Justo <rjusto@gmail.com> writes:

> In 83c750acde (wt-status.*: better advice for git status added,
> 2012-06-05), git-status received new informative messages to describe
> the ongoing work in a worktree.
>
> These messages were enhanced in 0722c805d6 (status: show the branch name
> if possible in in-progress info, 2013-02-03), to show, if possible, the
> branch where the operation was initiated.
>
> Since then, we show incorrect information when several operations are in
> progress and one of them is bisect:
>
>    $ git checkout -b foo
>    $ GIT_SEQUENCE_EDITOR='echo break >' git rebase -i HEAD~
>    $ git checkout -b bar
>    $ git bisect start
>    $ git status
>    ...
>
>    You are currently editing a commit while rebasing branch 'bar' on '...'.
>
>    You are currently bisecting, started from branch 'bar'.
>
>    ...
>
> Note that we erroneously say "while rebasing branch 'bar'" when we
> should be referring to "foo".
>
> This must have gone unnoticed for so long because it must be unusual to
> start a bisection while another operation is in progress.  And even less
> usual to involve different branches.
>
> It caught my attention reviewing a leak introduced in 8b87cfd000
> (wt-status: move strbuf into read_and_strip_branch(), 2013-03-16).
>
> A simple change to deal with this situation can be to record in struct
> wt_status_state, the branch where the bisect starts separately from the
> branch related to other operations.
>
> Let's do it and so we'll be able to display correct information and
> we'll avoid the leak as well.
>
> Signed-off-by: Rubén Justo <rjusto@gmail.com>
>
> ---
>
> Let's try again.

Sigh... nobody seems to be interested in making sure this correctly
improves the system X-<.

After a quick re-read, I didn't find anything glaringly wrong, so
let's see if anybody complains after the patch gets merged to
'next'.

Thanks.

      reply	other threads:[~2023-10-16 22:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-30  1:07 [PATCH] status: fix branch shown when not only bisecting Rubén Justo
2023-07-31 23:45 ` Junio C Hamano
2023-08-01 20:39   ` Rubén Justo
2023-08-01 20:45     ` Junio C Hamano
2023-08-16  4:24       ` Junio C Hamano
2023-09-09 20:12 ` [PATCH v2] " Rubén Justo
2023-10-16 22:08   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqil76kyov.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=rjusto@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).