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

Re: [PATCH 0/9] gitk: improve keyboard support

From
JLJens Lideström <jens@lidestrom.se>
Date
Jul 2, 2023, 12:28 UTC
Message-ID
<b1a6e507-ff96-9d98-1c65-a9518476f704@lidestrom.se>
In-Reply-To
<0cb94aa5-726f-a57f-858c-b29764c63ce7@kdbg.org>
I have updated the PR after suggestions from Hannes. Mainly these changes have been made:
* The reset command dialog uses "mixed" as the default, but is more convenient to navigate with the keyboard.
* Remove and checkout branch commands now have branch selection dialogs if there is more than one branch head on the selected commit.
* Remove and checkout branch command patches handles a few more cases regarding remote branches and detached heads that I didn't think about originally. This has made them larger.
* I have split one commit, added another and moved some functionality around. Because of this the original patch number are no longer in sync with GitHub. How should I handle that?
On 2023-06-28 08:09, Johannes Sixt wrote:
> Please note that gitk-git directory is in its own repository that is
> only subtree-merged into the Git repository. You should generate patches
> against git://git.ozlabs.org/~paulus/gitk (I don't know how difficult it
> would be for Paul to integrate patches that were generated by gitgitgadget).
@Paul Mackerras: Paul, can you have a look at this? Can you accept a PR through GitGitGadget if I rebase it onto master for git.ozlabs.org/~paulus/gitk? Or do you have some other preferred way to receive patches?

Best regards, Jens Lideström

On 2023-06-28 08:09, Johannes Sixt wrote:
Show 54 quoted lines
> Am 27.06.23 um 16:41 schrieb Jens Lidestrom via GitGitGadget:
>> It is often convenient to use the keyboard to navigate the gitk GUI and
>> there are keyboard shortcut bindings for many operations such as searching
>> and scrolling. There is however no keyboard binding for the most common
>> operations on branches and commits: Check out, reset, cherry-pick, create
>> and delete branches.
>>
>> This PR adds keyboard bindings for these 5 commands. It also adjusts some
>> GUI focus defaults to simplify keyboard navigation.
>>
>> Some refactoring of the command implementation has been necessary.
>> Originally the commands was using the mouse context menu to get info about
>> the head and commit to act on. When using keyboard binds this information
>> isn't available so instead the row that is selected in the GUI is used. By
>> adding procedures for doing this the PR lays the groundwork for more similar
>> keyboard binds in the future.
> 
> I like it when an application can be navigated with the keyboard. These
> changes are very much appreciated.
> 
> I've left some comments on individual commits. The important one is that
> I think it makes the Reset dialog way too easy to destroy uncommitted work.
> 
> Please note that gitk-git directory is in its own repository that is
> only subtree-merged into the Git repository. You should generate patches
> against git://git.ozlabs.org/~paulus/gitk (I don't know how difficult it
> would be for Paul to integrate patches that were generated by gitgitgadget).
> 
> -- Hannes
> 
>>
>> I'm including Paul Mackerras because he seems to be the maintainer of gitk.
>> Can you review, Paul?
>>
>> Jens Lidestrom (9):
>>   gitk: add procedures to get commit info from selected row
>>   gitk: use term "current branch" in gui
>>   gitk: add keyboard bind for reset
>>   gitk: show branch name in reset dialog
>>   gitk: add keyboard bind for checkout
>>   gitk: add keyboard bind for create and remove branch
>>   gitk: add keyboard bind to cherry-pick
>>   gitk: focus ok button in reset dialog
>>   gitk: default select reset hard in dialog
>>
>>  gitk-git/gitk | 132 ++++++++++++++++++++++++++++++++++++--------------
>>  1 file changed, 96 insertions(+), 36 deletions(-)
>>
>>
>> base-commit: 94486b6763c29144c60932829a65fec0597e17b3
>> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1551%2Fjensli%2Fkeyboard-for-gitk-v1
>> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1551/jensli/keyboard-for-gitk-v1
>> Pull-Request: https://github.com/gitgitgadget/git/pull/1551
> 
Previous: Johannes SixtNext: Jens Lidestrom via GitGitGadget
Message 23 of 42 in “gitk: improve keyboard support”
  1. 0/9 gitk: improve keyboard supportJens Lidestrom via GitGitGadget, Jun 27, 2023
  2. 1/9 gitk: add procedures to get commit info from selected rowJens Lidestrom via GitGitGadget, Jun 27, 2023
  3. 2/9 gitk: use term "current branch" in guiJens Lidestrom via GitGitGadget, Jun 27, 2023
  4. 3/9 gitk: add keyboard bind for resetJens Lidestrom via GitGitGadget, Jun 27, 2023
  5. 4/9 gitk: show branch name in reset dialogJens Lidestrom via GitGitGadget, Jun 27, 2023
  6. 5/9 gitk: add keyboard bind for checkoutJens Lidestrom via GitGitGadget, Jun 27, 2023
  7. Jens LideströmJul 2, 2023
  8. 6/9 gitk: add keyboard bind for create and remove branchJens Lidestrom via GitGitGadget, Jun 27, 2023
  9. Johannes SixtJun 28, 2023
  10. Jens LideströmJun 28, 2023
  11. Johannes SixtJun 28, 2023
  12. Jens LideströmJul 2, 2023
  13. 7/9 gitk: add keyboard bind to cherry-pickJens Lidestrom via GitGitGadget, Jun 27, 2023
  14. 8/9 gitk: focus ok button in reset dialogJens Lidestrom via GitGitGadget, Jun 27, 2023
  15. 9/9 gitk: default select reset hard in dialogJens Lidestrom via GitGitGadget, Jun 27, 2023
  16. Johannes SixtJun 28, 2023
  17. Jens LideströmJun 28, 2023
  18. Jens LideströmJul 2, 2023
  19. Johannes SixtJun 28, 2023
  20. Jens LideströmJun 28, 2023
  21. Jens LideströmJun 28, 2023
  22. Johannes SixtJun 28, 2023
  23. Jens LideströmJul 2, 2023
  24. 00/10 gitk: improve keyboard supportJens Lidestrom via GitGitGadget, Jul 3, 2023
  25. 01/10 gitk: add procedures to get commit info from selected rowJens Lidestrom via GitGitGadget, Jul 3, 2023
  26. 02/10 gitk: use term "current branch" in guiJens Lidestrom via GitGitGadget, Jul 3, 2023
  27. 03/10 gitk: add keyboard bind for reset commandJens Lidestrom via GitGitGadget, Jul 3, 2023
  28. 04/10 gitk: show branch name in reset dialogJens Lidestrom via GitGitGadget, Jul 3, 2023
  29. 06/10 gitk: add keyboard bind for remove branch commandJens Lidestrom via GitGitGadget, Jul 3, 2023
  30. Johannes SixtJul 5, 2023
  31. Jens LideströmJul 8, 2023
  32. 05/10 gitk: add keyboard bind for checkout commandJens Lidestrom via GitGitGadget, Jul 3, 2023
  33. Johannes SixtJul 5, 2023
  34. Jens LideströmJul 8, 2023
  35. 07/10 gitk: add keyboard bind for cherry-pick commandJens Lidestrom via GitGitGadget, Jul 3, 2023
  36. Johannes SixtJul 5, 2023
  37. Jens LideströmJul 8, 2023
  38. 08/10 gitk: add keyboard bind for create branch commandJens Lidestrom via GitGitGadget, Jul 3, 2023
  39. Johannes SixtJul 5, 2023
  40. 09/10 gitk: improve keyboard convenience in reset dialogJens Lidestrom via GitGitGadget, Jul 3, 2023
  41. Johannes SixtJul 5, 2023
  42. 10/10 gitk: allow checkout of remote branchJens Lidestrom via GitGitGadget, Jul 3, 2023

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.