Skip to content

Instantly share code, notes, and snippets.

@Konctantin
Last active August 29, 2015 14:19
Show Gist options
  • Save Konctantin/915703d02b2731b93d4a to your computer and use it in GitHub Desktop.
Save Konctantin/915703d02b2731b93d4a to your computer and use it in GitHub Desktop.
append more commands for git-gui
$ctxm add command -label [mc "Open in external editor"] \
-command {
#set prog "notepad"
set prog "C:\\Program Files (x86)\\Notepad++\\notepad++.exe"
exec $prog [file join $_gitworktree $current_diff_path]
}
$ctxm add command -label [mc "Reset file changes"] \
-command {
if { $current_diff_path ne "" && [tk_messageBox \
-icon question \
-type yesno \
-default no \
-title "[appname]: Question" \
-message [mc "Restore the most recent version of this file?"]] eq {yes}} {
git "checkout" $current_diff_path
ui_do_rescan
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment