Merge branch 'sc/difftool-p4merge'
* sc/difftool-p4merge: mergetool--lib: add p4merge as a pre-configured mergetool option
This commit is contained in:
commit
9fa51ff940
@ -31,7 +31,7 @@ OPTIONS
|
||||
Use the diff tool specified by <tool>.
|
||||
Valid merge tools are:
|
||||
kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,
|
||||
ecmerge, diffuse, opendiff and araxis.
|
||||
ecmerge, diffuse, opendiff, p4merge and araxis.
|
||||
+
|
||||
If a diff tool is not specified, 'git-difftool'
|
||||
will use the configuration variable `diff.tool`. If the
|
||||
|
@ -27,7 +27,7 @@ OPTIONS
|
||||
Use the merge resolution program specified by <tool>.
|
||||
Valid merge tools are:
|
||||
kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge,
|
||||
diffuse, tortoisemerge, opendiff and araxis.
|
||||
diffuse, tortoisemerge, opendiff, p4merge and araxis.
|
||||
+
|
||||
If a merge resolution program is not specified, 'git-mergetool'
|
||||
will use the configuration variable `merge.tool`. If the
|
||||
|
@ -23,7 +23,7 @@ merge.tool::
|
||||
Controls which merge resolution program is used by
|
||||
linkgit:git-mergetool[1]. Valid built-in values are: "kdiff3",
|
||||
"tkdiff", "meld", "xxdiff", "emerge", "vimdiff", "gvimdiff",
|
||||
"diffuse", "ecmerge", "tortoisemerge", "araxis", and
|
||||
"diffuse", "ecmerge", "tortoisemerge", "p4merge", "araxis" and
|
||||
"opendiff". Any other value is treated is custom merge tool
|
||||
and there must be a corresponding mergetool.<tool>.cmd option.
|
||||
|
||||
|
@ -953,7 +953,7 @@ _git_diff ()
|
||||
}
|
||||
|
||||
__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
|
||||
tkdiff vimdiff gvimdiff xxdiff araxis
|
||||
tkdiff vimdiff gvimdiff xxdiff araxis p4merge
|
||||
"
|
||||
|
||||
_git_difftool ()
|
||||
|
@ -46,7 +46,7 @@ check_unchanged () {
|
||||
valid_tool () {
|
||||
case "$1" in
|
||||
kdiff3 | tkdiff | xxdiff | meld | opendiff | \
|
||||
emerge | vimdiff | gvimdiff | ecmerge | diffuse | araxis)
|
||||
emerge | vimdiff | gvimdiff | ecmerge | diffuse | araxis | p4merge)
|
||||
;; # happy
|
||||
tortoisemerge)
|
||||
if ! merge_mode; then
|
||||
@ -130,6 +130,19 @@ run_merge_tool () {
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE"
|
||||
fi
|
||||
;;
|
||||
p4merge)
|
||||
if merge_mode; then
|
||||
touch "$BACKUP"
|
||||
if $base_present; then
|
||||
"$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
|
||||
else
|
||||
"$merge_tool_path" "$LOCAL" "$LOCAL" "$REMOTE" "$MERGED"
|
||||
fi
|
||||
check_unchanged
|
||||
else
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE"
|
||||
fi
|
||||
;;
|
||||
meld)
|
||||
if merge_mode; then
|
||||
touch "$BACKUP"
|
||||
@ -323,7 +336,7 @@ guess_merge_tool () {
|
||||
else
|
||||
tools="opendiff kdiff3 tkdiff xxdiff meld $tools"
|
||||
fi
|
||||
tools="$tools gvimdiff diffuse ecmerge araxis"
|
||||
tools="$tools gvimdiff diffuse ecmerge p4merge araxis"
|
||||
fi
|
||||
if echo "${VISUAL:-$EDITOR}" | grep emacs > /dev/null 2>&1; then
|
||||
# $EDITOR is emacs so add emerge as a candidate
|
||||
|
Loading…
Reference in New Issue
Block a user