Skip to content

Commit

Permalink
Add git-mergetool to run an appropriate merge conflict resolution pro…
Browse files Browse the repository at this point in the history
…gram

The git-mergetool program can be used to automatically run an appropriate
merge resolution program to resolve merge conflicts.  It will automatically
run one of kdiff3, tkdiff, meld, xxdiff, or emacs emerge programs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Theodore Ts'o committed Mar 14, 2007
1 parent 27ebd6e commit c4b4a5a
Show file tree
Hide file tree
Showing 5 changed files with 405 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ git-merge-ours
git-merge-recursive
git-merge-resolve
git-merge-stupid
git-mergetool
git-mktag
git-mktree
git-name-rev
Expand Down
5 changes: 5 additions & 0 deletions Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,11 @@ merge.summary::
Whether to include summaries of merged commits in newly created
merge commit messages. False by default.

merge.tool::
Controls which merge resolution program is used by
gitlink:git-mergetool[l]. Valid values are: "kdiff3", "tkdiff",
"meld", "xxdiff", "emerge"

merge.verbosity::
Controls the amount of output shown by the recursive merge
strategy. Level 0 outputs nothing except a final error
Expand Down
46 changes: 46 additions & 0 deletions Documentation/git-mergetool.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
git-mergetool(1)
================

NAME
----
git-mergetool - Run merge conflict resolution tools to resolve merge conflicts

SYNOPSIS
--------
'git-mergetool' [--tool=<tool>] [<file>]...

DESCRIPTION
-----------

Use 'git mergetool' to run one of several merge utilities to resolve
merge conflicts. It is typically run after gitlink:git-merge[1].

If one or more <file> parameters are given, the merge tool program will
be run to resolve differences on each file. If no <file> names are
specified, 'git mergetool' will run the merge tool program on every file
with merge conflicts.

OPTIONS
-------
-t or --tool=<tool>::
Use the merge resolution program specified by <tool>.
Valid merge tools are:
kdiff3, tkdiff, meld, xxdiff, and emerge.

If a merge resolution program is not specified, 'git mergetool'
will use the configuration variable merge.tool. If the
configuration variable merge.tool is not set, 'git mergetool'
will pick a suitable default.

Author
------
Written by Theodore Y Ts'o <tytso@mit.edu>

Documentation
--------------
Documentation by Theodore Y Ts'o.

GIT
---
Part of the gitlink:git[7] suite

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ SCRIPT_SH = \
git-clean.sh git-clone.sh git-commit.sh \
git-fetch.sh git-gc.sh \
git-ls-remote.sh \
git-merge-one-file.sh git-parse-remote.sh \
git-merge-one-file.sh git-mergetool.sh git-parse-remote.sh \
git-pull.sh git-rebase.sh \
git-repack.sh git-request-pull.sh git-reset.sh \
git-sh-setup.sh \
Expand Down
Loading

0 comments on commit c4b4a5a

Please sign in to comment.