threads / patch / 22071

patchgit-gui: Add hotkeys for "Unstage from commit" and "Revert changes"

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

## tl;dr

2 messages between Dec 31, 2009 and Jan 7, 2010. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

public_vi@tut.by· Dec 31, 2009, 13:32 UTC · lore
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(-)
Show changes to git-gui/git-gui.sh +8 −2
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
Shawn O. Pearce· Jan 7, 2010, 02:22 UTC · re: public_vi@tut.by · lore

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

public_vi@tut.by wrote:
Show 6 quoted lines
> 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(-)
Thanks, applied.
(Ignore my private email from a few minutes ago asking for a repost,
 its not necessary.)
 
-- 
Shawn.

← back to recent threads