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
Jan Ziak <0xe2.0x9a.0x9b@gmail.com>
Date
Mar 31, 2019, 19:47 UTC
Message-ID
<CAODFU0p4FxZP34L=LAZX=25EFn6NK8vD7p47bsUu8yd+TpCb_Q@mail.gmail.com>
In-Reply-To
<CAKPyHN2Unp7Cou86fefYo9nD_ApokMxRMih=d27=rp634bYKwQ@mail.gmail.com>
On Sun, 31 Mar 2019 at 21:15, Bert Wesarg <bert.wesarg@googlemail.com> wrote:
Show 13 quoted lines
>
> 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.

Sincerely Jan

Show 8 quoted lines
> Best,
> Bert
>
> >
> > git version 2.21.0
> >
> > Sincerely
> > Jan
Previous: Bert WesargNext: Bert Wesarg
Message 3 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.