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

[PATCH] git-gui: Add hotkeys for "Unstage from commit" and "Revert changes"

From
public_vi@tut.by <public_vi@tut.by>
Date
Dec 31, 2009, 13:32 UTC
Message-ID
<1262266373-7314-1-git-send-email-public_vi@tut.by>
From: Vitaly _Vi Shukela <public_vi@tut.by>
Signed-off-by: Vitaly _Vi Shukela <public_vi@tut.by>
---
 git-gui/git-gui.sh |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 14b92ba..28270ad 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -2509,12 +2509,14 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
 	.mbar.commit add command -label [mc "Unstage From Commit"] \
-		-command do_unstage_selection
+		-command do_unstage_selection \
+		-accelerator $M1T-U
 	lappend disable_on_lock \
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
 	.mbar.commit add command -label [mc "Revert Changes"] \
-		-command do_revert_selection
+		-command do_revert_selection \
+		-accelerator $M1T-J
 	lappend disable_on_lock \
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
@@ -3254,6 +3256,10 @@ unset gm
 bind $ui_comm <$M1B-Key-Return> {do_commit;break}
 bind $ui_comm <$M1B-Key-t> {do_add_selection;break}
 bind $ui_comm <$M1B-Key-T> {do_add_selection;break}
+bind $ui_comm <$M1B-Key-u> {do_unstage_selection;break}
+bind $ui_comm <$M1B-Key-U> {do_unstage_selection;break}
+bind $ui_comm <$M1B-Key-j> {do_revert_selection;break}
+bind $ui_comm <$M1B-Key-J> {do_revert_selection;break}
 bind $ui_comm <$M1B-Key-i> {do_add_all;break}
 bind $ui_comm <$M1B-Key-I> {do_add_all;break}
 bind $ui_comm <$M1B-Key-x> {tk_textCut %W;break}
-- 
1.6.5.6
Next: Shawn O. Pearce
Message 1 of 2 in “git-gui: Add hotkeys for "Unstage from commit" and "Revert changes"”
  1. git-gui: Add hotkeys for "Unstage from commit" and "Revert changes"public_vi@tut.by, Dec 31, 2009
  2. Shawn O. PearceJan 7, 2010

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.