summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2008-08-31 00:56:51 +0400
committerShawn O. Pearce <spearce@spearce.org>2008-09-04 21:28:54 -0700
commit7e30682ce042fdea1ff2c76226b17d9affe2f9bf (patch)
tree0e544ab4c3a8fa07a96dc89637e9807ab7e2a0bb /git-gui.sh
parent042c232535c329f168e8a515588f38a4117954fb (diff)
downloadgit-7e30682ce042fdea1ff2c76226b17d9affe2f9bf.tar.gz
git-gui: Support calling merge tools.
Adds an item to the diff context menu in conflict mode, which invokes a merge tool for the selected file. Tool command-line handling code was ported from git-mergetool. Automatic default tool selection and custom merge tools are not supported. If merge.tool is not set, git-gui defaults to meld. This implementation uses a checkout-index hack in order to retrieve all stages with autocrlf and filters properly applied. It requires temporarily moving the original conflict file out of the way. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 3ce33283c2..677a27150c 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -657,6 +657,8 @@ proc apply_config {} {
}
set default_config(branch.autosetupmerge) true
+set default_config(merge.tool) {}
+set default_config(merge.keepbackup) true
set default_config(merge.diffstat) true
set default_config(merge.summary) false
set default_config(merge.verbosity) 2
@@ -2776,6 +2778,11 @@ create_common_diff_popup $ctxm
set ctxmmg .vpane.lower.diff.body.ctxmmg
menu $ctxmmg -tearoff 0
$ctxmmg add command \
+ -label [mc "Run Merge Tool"] \
+ -command {merge_resolve_tool}
+lappend diff_actions [list $ctxmmg entryconf [$ctxmmg index last] -state]
+$ctxmmg add separator
+$ctxmmg add command \
-label [mc "Use Remote Version"] \
-command {merge_resolve_one 3}
lappend diff_actions [list $ctxmmg entryconf [$ctxmmg index last] -state]