git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* git-gui: unstaged changes windowpane resets after unstaging a line
@ 2019-03-31 18:44 Jan Ziak
  2019-03-31 19:14 ` Bert Wesarg
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Ziak @ 2019-03-31 18:44 UTC (permalink / raw)
  To: git

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.

git version 2.21.0

Sincerely
Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: git-gui: unstaged changes windowpane resets after unstaging a line
  2019-03-31 18:44 git-gui: unstaged changes windowpane resets after unstaging a line Jan Ziak
@ 2019-03-31 19:14 ` Bert Wesarg
  2019-03-31 19:47   ` Jan Ziak
  0 siblings, 1 reply; 5+ messages in thread
From: Bert Wesarg @ 2019-03-31 19:14 UTC (permalink / raw)
  To: Jan Ziak; +Cc: Git Mailing List

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.

Anyway, which problem do you observe in particular?

Best,
Bert

>
> git version 2.21.0
>
> Sincerely
> Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: git-gui: unstaged changes windowpane resets after unstaging a line
  2019-03-31 19:14 ` Bert Wesarg
@ 2019-03-31 19:47   ` Jan Ziak
  2019-04-01  6:40     ` Bert Wesarg
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Ziak @ 2019-03-31 19:47 UTC (permalink / raw)
  To: Bert Wesarg; +Cc: Git Mailing List

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.

Sincerely
Jan

> Best,
> Bert
>
> >
> > git version 2.21.0
> >
> > Sincerely
> > Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: git-gui: unstaged changes windowpane resets after unstaging a line
  2019-03-31 19:47   ` Jan Ziak
@ 2019-04-01  6:40     ` Bert Wesarg
  2019-04-01 12:29       ` Jan Ziak
  0 siblings, 1 reply; 5+ messages in thread
From: Bert Wesarg @ 2019-04-01  6:40 UTC (permalink / raw)
  To: Jan Ziak; +Cc: Git Mailing List

On Sun, Mar 31, 2019 at 9:48 PM Jan Ziak <0xe2.0x9a.0x9b@gmail.com> wrote:
>
> 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

>
> Sincerely
> Jan
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: git-gui: unstaged changes windowpane resets after unstaging a line
  2019-04-01  6:40     ` Bert Wesarg
@ 2019-04-01 12:29       ` Jan Ziak
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Ziak @ 2019-04-01 12:29 UTC (permalink / raw)
  To: Bert Wesarg; +Cc: Git Mailing List

[-- Attachment #1: Type: text/plain, Size: 682 bytes --]

On Mon, 1 Apr 2019 at 08:40, Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> Could you try to come up with a recipe from an empty repository?

$ cat a.sh
#!/bin/bash
set -e
git init
for((i=0; i<25; i++)); do
    echo line1 > file$i
done
git add file*
git commit -m "initial commit"
for((i=0; i<25; i++)); do
    echo line2 >> file$i
    echo line3 >> file$i
    echo line4 >> file$i
done
git gui

Run a.sh in a new empty directory, then:
  1. Select "Unstaged Changes" -> file24
  2. Stage line2 & line3 for commit
  3. Select "Staged Changes" -> file24
  4. Unstage line2 from commit (see the attached screenshot)
  5. >>> "Unstaged Changes" windowpane resets <<<

Sincerely
Jan

[-- Attachment #2: desktop 2019-04-01 14:15:30+02:00.png --]
[-- Type: image/png, Size: 52139 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-01 12:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-31 18:44 git-gui: unstaged changes windowpane resets after unstaging a line Jan Ziak
2019-03-31 19:14 ` Bert Wesarg
2019-03-31 19:47   ` Jan Ziak
2019-04-01  6:40     ` Bert Wesarg
2019-04-01 12:29       ` Jan Ziak

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git