Re: [PATCH] git-gui: allow Ctrl+T to toggle multiple paths (Re: [BUG] git gui can't commit multiple files)
From: Timon <hidden>
Date: 2017-12-03 15:06:10
On 12/2/17, Jonathan Nieder [off-list ref] wrote:
Jonathan Nieder wrote:quoted
From: Johannes Schindelin <redacted> Subject: git-gui: allow Ctrl+T to toggle multiple paths In the Unstaged Changes panel, selecting multiple lines (using shift+click) and pressing ctrl+t to stage them causes one file to be staged instead of all of the selected files. The same also happens when unstaging files. This regression appears to have been introduced by gitgui-0.21.0~7^2~1 (Allow keyboard control to work in the staging widgets, 2016-10-01). Also reported by zosrothko as a Git-for-Windows issue: https://github.com/git-for-windows/git/issues/1012 [jn: fleshed out commit message] Reported-by: Timon <redacted> Signed-off-by: Johannes Schindelin <redacted> Signed-off-by: Jonathan Nieder <redacted>Gah, this should say: Signed-off-by; Jonathan Nieder [off-list ref] [...]quoted
quoted
I applied it locally to git-2.15.0 and can confirm it fixed the problem for me. If you need any more info/help from me, or would like me to test anything, feel free to ask.Thanks for this pointer. I'm including the patch here so the project can consider applying it (it doesn't appear to have been sent upstream before). I have not tested it or verified the claim it makes about what change introduced this regression --- if you're able to help with that, that would be welcome.Can you bisect? That is: git clone git://repo.or.cz/git-gui cd git-gui git bisect start git bisect good gitgui-0.20.0 git bisect bad gitgui-0.21.0 Then cut to the chase: git checkout gitgui-0.21.0~7^2~1 ... test test test ... git bisect (good|bad) git checkout gitgui-0.21.0~7^2~1^ ... test test test ... git bisect (good|bad) and follow the instructions if it suggests testing additional versions. Then I'll be happy to re-send the patch with the results from your testing. Thanks again, Jonathan
Did the testing and it went smoothly with the outcome:
088ad75dc279614849f92e5ae0a2b579b26719eb is the first bad commit
commit 088ad75dc279614849f92e5ae0a2b579b26719eb
Author: Pat Thoyts [off-list ref]
Date: Sat Oct 1 22:04:39 2016 +0100
Allow keyboard control to work in the staging widgets.
Keyboard focus was restricted to the commit message widget and users were
forced to use the mouse to select files in the workdir widget and only then
could use a key combination to stage the file.
It is now possible to use key navigation (Ctrl-Tab, arrow keys and Ctrl-T
or Ctrl-U) to stage and unstage files.
Suggested by @koppor in git-for-window/git issue #859
Signed-off-by: Pat Thoyts [off-list ref]
:100755 100755 11048c7a0e94f598b168de98d18fda9aea420c7d
ec1cc43e8f73acd3d52047ece4dfab5edeb6ffb4 M git-gui.sh