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

Re: git-gui: unstaged changes windowpane resets after unstaging a line

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Apr 1, 2019, 06:40 UTC
Message-ID
<CAKPyHN1ekK8o8vnBEhvjLtz0G0=FFVkpAH6Qq92TC3E=dXQGfg@mail.gmail.com>
In-Reply-To
<CAODFU0p4FxZP34L=LAZX=25EFn6NK8vD7p47bsUu8yd+TpCb_Q@mail.gmail.com>
On Sun, Mar 31, 2019 at 9:48 PM Jan Ziak <0xe2.0x9a.0x9b@gmail.com> wrote:
Show 29 quoted lines
>
> On Sun, 31 Mar 2019 at 21:15, Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> >
> > Hi Jan,
> >
> > On Sun, Mar 31, 2019 at 8:45 PM Jan Ziak <0xe2.0x9a.0x9b@gmail.com> wrote:
> > >
> > > Hello
> > >
> > > After performing "Unstage Line From Commit" action, the "Unstaged
> > > Changes" windowpane is reset. The reset does not happen with "Unstage
> > > Hunk From Commit" action.
> >
> > because its not necessary when staging a hunk. Though when staging a
> > line it is better to run the diff algorithm again.
>
> Yes. I was thinking comparing the old state of "Unstaged Changes" to
> the new state and preserving (or approximating) the selected filename
> and scroller position if possible.
>
> When unstaging a line (or a hunk) there is internally no possibility
> for the currently selected filename to disappear from the "Unstaged
> Changes" list.
>
> > Anyway, which problem do you observe in particular?
>
> The problem is that the selected filename and scroller position are
> reinitialized. It is uncomfortable when "Unstaged Changes" contains a
> lot of filenames.

I can't confirm this behavior. Neither when staging lines from the "Unstaged Changes" file list, nor when unstaging lines from the "Stages Changes (Will Commit)" file list.

Could you try to come up with a recipe from an empty repository?

Best, Bert

Show 5 quoted lines
>
> Sincerely
> Jan
>
>
Previous: Jan ZiakNext: Jan Ziak
Message 4 of 5 in “git-gui: unstaged changes windowpane resets after unstaging a line”
  1. Jan ZiakMar 31, 2019
  2. Bert WesargMar 31, 2019
  3. Jan ZiakMar 31, 2019
  4. Bert WesargApr 1, 2019
  5. Jan ZiakApr 1, 2019

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.