threads / discuss / 29454

git-gui Ctrl-U (unstage) broken

Subject: git-gui Ctrl-U (unstage) broken

## tl;dr

5 messages between Jan 27, 2012 and Feb 6, 2012.

replies: 4people: 5as markdown or json

Victor Engmark· Jan 27, 2012, 14:03 UTC · lore
Using the git-gui available with the default Ubuntu 10.10 repos, I'm
not able to unstage files with the default keyboard shortcut. To
reproduce:
1. Change a file in the repository
2. Run `git gui`
3. Stage the changed file
4. Select the changed file in the "Staged Changes (Will Commit)" list
5. Click Ctrl-U
Expected outcome: The selected file should be unstaged.
Actual outcome: Nothing at all changes in the GUI.

Verified that other keyboard shortcuts work: Ctrl-T, Ctrl-I, Ctrl--, Ctrl-+, F5. These (except Ctrl-T, obviously) were tested in* both the "Unstaged Changes" and "Staged Changes (Will Commit)" listsp

* That is, after focusing a single element in that list.
Version info:

git-gui version 0.12.0.64.g89d6 git version 1.7.1

Tcl/Tk version 8.5.8 Aspell 0.60.6, en_US

Cheers, V

Pat Thoyts· Jan 29, 2012, 23:19 UTC · re: Victor Engmark · lore

Re: git-gui Ctrl-U (unstage) broken

Victor Engmark <victor.engmark@gmail.com> writes:
Show 26 quoted lines
>Using the git-gui available with the default Ubuntu 10.10 repos, I'm
>not able to unstage files with the default keyboard shortcut. To
>reproduce:
>1. Change a file in the repository
>2. Run `git gui`
>3. Stage the changed file
>4. Select the changed file in the "Staged Changes (Will Commit)" list
>5. Click Ctrl-U
>
>Expected outcome: The selected file should be unstaged.
>
>Actual outcome: Nothing at all changes in the GUI.
>
>Verified that other keyboard shortcuts work: Ctrl-T, Ctrl-I, Ctrl--,
>Ctrl-+, F5. These (except Ctrl-T, obviously) were tested in* both the
>"Unstaged Changes" and "Staged Changes (Will Commit)" listsp
>
>* That is, after focusing a single element in that list.
>
>Version info:
>
>git-gui version 0.12.0.64.g89d6
>git version 1.7.1
>
>Tcl/Tk version 8.5.8
>Aspell 0.60.6, en_US

I checked this with the current version (gitgui-0.16.0) and it works ok for me (on windows) - ie: ctrl-u unstaged a selected file.

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
Clemens Buchacher· Jan 30, 2012, 19:22 UTC · re: Pat Thoyts · lore

Re: git-gui Ctrl-U (unstage) broken

Hi Victor,
Victor Engmark <victor.engmark@gmail.com> writes:
Show 8 quoted lines
>
> Version info:
> 
> git-gui version 0.12.0.64.g89d6
> git version 1.7.1
> 
> Tcl/Tk version 8.5.8
> Aspell 0.60.6, en_US

I could reproduce this issue on my Fedora 14 box at dayjob with the git-gui package that corresponds to git version 1.7.4.4 (git-gui version 0.13.0.8.g8f855 according to git.git).

But I cannot reproduce with the current git version or even with git 1.7.1 and git-gui 0.12.0.64.g89d6 on my Arch Linux box, where I have Tcl/Tk version 8.5.11.

I have to check which Tcl/Tk version the F14 box uses. But the bug does not seem to depend on the git gui version. Have you tried upgrading Tcl/Tk?

Clemens
Phil Hord· Jan 30, 2012, 20:50 UTC · re: Clemens Buchacher · lore

Re: git-gui Ctrl-U (unstage) broken

On Mon, Jan 30, 2012 at 2:22 PM, Clemens Buchacher <drizzd@aon.at> wrote:
Show 11 quoted lines
> I could reproduce this issue on my Fedora 14 box at dayjob with the
> git-gui package that corresponds to git version 1.7.4.4 (git-gui version
> 0.13.0.8.g8f855 according to git.git).
>
> But I cannot reproduce with the current git version or even with git
> 1.7.1 and git-gui 0.12.0.64.g89d6 on my Arch Linux box, where I have
> Tcl/Tk version 8.5.11.
>
> I have to check which Tcl/Tk version the F14 box uses. But the bug does
> not seem to depend on the git gui version. Have you tried upgrading
> Tcl/Tk?
I haven't tried anything to fix this, but I'll add some data points.
* Ctrl-T / Ctrl-U Ctrl-J have never worked reliably for me on Ubuntu/Gnome.
* Ctrl-A does not work for "Remote > Add..."  since it performs "Edit
> Select All" instead
All the other combos I tried work ok.

Maybe the last one is a clue, though I can't think what Ctrl-T might be assigned to, and it's not listed in the menus as being assigned to anything else. But maybe the works-ness of it is related to the window focus.

Phil
Stefan Haller· Feb 6, 2012, 16:48 UTC · re: Pat Thoyts · lore

Re: git-gui Ctrl-U (unstage) broken

Pat Thoyts <patthoyts@users.sourceforge.net> wrote:
Show 17 quoted lines
> Victor Engmark <victor.engmark@gmail.com> writes:
> 
> >Using the git-gui available with the default Ubuntu 10.10 repos, I'm
> >not able to unstage files with the default keyboard shortcut. To
> >reproduce:
> >1. Change a file in the repository
> >2. Run `git gui`
> >3. Stage the changed file
> >4. Select the changed file in the "Staged Changes (Will Commit)" list
> >5. Click Ctrl-U
> >
> >Expected outcome: The selected file should be unstaged.
> >
> >Actual outcome: Nothing at all changes in the GUI.
> 
> I checked this with the current version (gitgui-0.16.0) and it works ok
> for me (on windows) - ie: ctrl-u unstaged a selected file.

Pat, it depends on where the focus is when you press ctrl-u. If you click in the diff pane, and then select the file to unstage, and then press ctrl-u, then nothing happens. If you click in the commit message field, then ctrl-u works fine.

The same problem exists with ctrl-j for "Revert Changes". In that case it is caused by the vi bindings that were introduced by 60aa065f69. It seems that a binding for <Key-j> is also triggered by ctrl-j (if you have a long diff you can see the diff pane scroll down by one line).

I'm not sure how to explain why ctrl-u doesn't work though, as I can't see any binding for <Key-u>, but maybe this gives a clue to someone who knows more about TCL than I do.

(It's not Windows-specific, btw: the same problem exists on Mac with Command-U and Command-J.)

-- 
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/

← back to recent threads