summaryrefslogtreecommitdiff
path: root/mergetools
AgeCommit message (Collapse)AuthorFilesLines
2013-02-14Merge branch 'da/p4merge-mktemp-fix'Libravatar Junio C Hamano1-1/+1
* da/p4merge-mktemp-fix: p4merge: fix printf usage
2013-02-10p4merge: fix printf usageLibravatar David Aguilar1-1/+1
Do not use a random string as if it is a format string for printf when showing it literally; instead feed it to '%s' format. Reported-by: Asheesh Laroia <asheesh@asheesh.org> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-07Merge branch 'ss/mergetools-tortoise'Libravatar Junio C Hamano1-4/+21
Update mergetools to work better with newer merge helper tortoise ships. * ss/mergetools-tortoise: mergetools: teach tortoisemerge to handle filenames with SP correctly mergetools: support TortoiseGitMerge
2013-02-07Merge branch 'jk/mergetool'Libravatar Junio C Hamano5-32/+5
Cleans up mergetool/difftool combo. * jk/mergetool: mergetools: simplify how we handle "vim" and "defaults" mergetool--lib: don't call "exit" in setup_tool mergetool--lib: improve show_tool_help() output mergetools/vim: remove redundant diff command git-difftool: use git-mergetool--lib for "--tool-help" git-mergetool: don't hardcode 'mergetool' in show_tool_help git-mergetool: remove redundant assignment git-mergetool: move show_tool_help to mergetool--lib
2013-02-01mergetools: teach tortoisemerge to handle filenames with SP correctlyLibravatar Sven Strickroth1-3/+11
TortoiseGitMerge, unlike TortoiseMerge, can be told to handle paths with spaces in them by using -option "$FILE" (not -option:"$FILE", which does not work for such paths) syntax. This change was necessary because of MSYS path mangling [1], the ":" after the "base" etc. arguments to TortoiseMerge caused the whole argument instead of just the file name to be quoted in case of file names with spaces. So TortoiseMerge was passed "-base:new file.txt" instead of -base:"new file.txt" (including the quotes). To work around this, TortoiseGitMerge does not require the ":" after the arguments anymore which fixes handling file names with spaces [2] (as written above). [1] http://www.mingw.org/wiki/Posix_path_conversion [2] https://github.com/msysgit/msysgit/issues/57 Signed-off-by: Sven Strickroth <email@cs-ware.de> Reported-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-28mergetools: simplify how we handle "vim" and "defaults"Libravatar David Aguilar5-22/+3
Remove the exceptions for "vim" and "defaults" in the mergetool library so that every filename in mergetools/ matches 1:1 with the name of a valid built-in tool. Define the trivial fallback definition of shell functions in-line in git-mergetool-lib script, instead of dot-sourcing them from another file. The result is much easier to follow. [jc: squashed in an update from John Keeping as well] Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-27mergetools/vim: remove redundant diff commandLibravatar David Aguilar1-10/+2
vimdiff and vimdiff2 differ only by their merge command so remove the logic in the diff command since it's not actually needed. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-26mergetools: support TortoiseGitMergeLibravatar Sven Strickroth1-1/+10
TortoiseMerge.exe was ben renamed to TortoiseGitMerge.exe (starting with 1.8.0) in order to make it clear that it has special support for git, and prevent confusion with the TortoiseSVN TortoiseMerge version. Signed-off-by: Sven Strickroth <email@cs-ware.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-26mergetools/p4merge: Honor $TMPDIR for the /dev/null placeholderLibravatar David Aguilar1-14/+13
Use $TMPDIR when creating the /dev/null placeholder for p4merge. This prevents users from finding a seemingly random untracked file in their worktree. This is different than what mergetool does with $LOCAL and $REMOTE because those files exist to aid users when resolving merges. p4merge's /dev/null placeholder is not helpful in that situation so it is sensible to keep it out of the worktree. Reported-by: Jeremy Morton <admin@game-point.net> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-25Merge branch 'da/mergetools-p4'Libravatar Jeff King1-0/+25
* da/mergetools-p4: mergetools/p4merge: Handle "/dev/null"
2012-10-11mergetools/p4merge: Handle "/dev/null"Libravatar David Aguilar1-0/+25
p4merge does not properly handle the case where "/dev/null" is passed as a filename. Work it around by creating a temporary file for this purpose. Reported-by: Jeremy Morton <admin@game-point.net> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> --- Needs to be amended with Tested-by when a report comes...
2012-10-01Merge branch 'da/mergetool-custom'Libravatar Junio C Hamano1-26/+2
The actual external command to run for mergetool backend can be specified with difftool/mergetool.$name.cmd configuration variables, but this mechanism was ignored for the backends we natively support. * da/mergetool-custom: mergetool--lib: Allow custom commands to override built-ins
2012-09-25mergetool--lib: Allow custom commands to override built-insLibravatar David Aguilar1-26/+2
Allow users to override the default commands provided by the mergetools/* scriptlets. Users occasionally run into problems where they expect to be able to override the built-in tool names. The documentation does not explicitly mention that built-ins cannot be overridden, so it's easy to assume that it should work. Lift this restriction so that built-in tools are handled the same way as user-configured tools. Add tests to guarantee this behavior. A nice benefit of this change is that it protects users from having future versions of git trump their custom configuration with a new built-in tool. C.f.: http://stackoverflow.com/questions/7435002/mergetool-from-gitconfig-being-ignored http://thread.gmane.org/gmane.comp.version-control.msysgit/13188 http://thread.gmane.org/gmane.comp.version-control.git/148267 Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-10Add Code Compare v2.80.4 as a merge / diff tool for WindowsLibravatar Sebastian Schuberth1-0/+25
Code Compare is a commercial file comparison tool for Windows, see http://www.devart.com/codecompare/ Version 2.80.4 added support for command line arguments preceded by a dash instead of a slash. This is required for Git for Windows because slashes in command line arguments get mangled with according to these rules: http://www.mingw.org/wiki/Posix_path_conversion Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-05mergetools: add a plug-in to support DeltaWalkerLibravatar Tim Henigan1-0/+21
DeltaWalker is a non-free tool popular among some users. Add a plug-in to support it from difftool and mergetool. Note that the $(pwd)/ in front of $MERGED should not be necessary. However without it, DeltaWalker crashes with a JRE exception. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Helped-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-14Merge branch 'jn/ancient-meld-support'Libravatar Junio C Hamano1-1/+1
* jn/ancient-meld-support: mergetools/meld: Use --help output to detect --output support
2012-02-10mergetools/meld: Use --help output to detect --output supportLibravatar Jonathan Nieder1-1/+1
In v1.7.7-rc0~3^2 (2011-08-19), git mergetool's "meld" support learned to use the --output option when calling versions of meld that are detected to support it (1.5.0 and newer, hopefully). Alas, it misdetects old versions (before 1.1.5, 2006-06-11) of meld as supporting the option, so on systems with such meld, instead of getting a nice merge helper, the operator gets a dialog box with the text "Wrong number of arguments (Got 5)". (Version 1.1.5 is when meld switched to using optparse. One consequence of that change was that errors in usage are detected and signalled through the exit status even when --help was passed.) Luckily there is a simpler check that is more reliable: the usage string printed by "meld --help" reliably reflects whether --output is supported in a given version. Use it. Reported-by: Jeff Epler <jepler@unpythonic.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-15mergetools: use the correct tool for Beyond Compare 3 on WindowsLibravatar Pat Thoyts1-1/+6
On Windows the bcompare tool launches a graphical program and does not wait for it to terminate. A separate 'bcomp' tool is provided which will wait for the view to exit so we use this instead. Reported-by: Werner BEROUX <werner@beroux.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-19mergetools/meld: Use '--output' when availableLibravatar David Aguilar1-1/+24
meld 1.5.0 and newer allow the output file to be specified when merging multiple files. Check whether the meld command supports '--output' and use it when available. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-19mergetool--lib: Refactor tools into separate filesLibravatar David Aguilar15-0/+306
Individual merge tools are now defined in a mergetools/$tool file which is sourced at runtime. The individual files are installed into $(git --exec-path)/mergetools/. New tools can be added by creating a new file instead of editing the git-mergetool--lib.sh scriptlet. http://thread.gmane.org/gmane.comp.version-control.git/134906/focus=135006 Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>