Skip to content

Commit

Permalink
git-gui: Add hotkeys for "Unstage from commit" and "Revert changes"
Browse files Browse the repository at this point in the history
Signed-off-by: Vitaly _Vi Shukela <public_vi@tut.by>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Vitaly _Vi Shukela authored and Shawn O. Pearce committed Jan 7, 2010
1 parent 54350a2 commit b677c66
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2543,12 +2543,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]
Expand Down Expand Up @@ -3296,6 +3298,10 @@ unset gws
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}
Expand Down

0 comments on commit b677c66

Please sign in to comment.