* [PATCH] mergetool-lib: add new merge tool TortoiseMerge
@ 2009-04-04 13:18 Markus Heidelberg
0 siblings, 0 replies; only message in thread
From: Markus Heidelberg @ 2009-04-04 13:18 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, David Aguilar, Charles Bailey, msysgit
TortoiseMerge comes with TortoiseSVN or TortoiseGit for Windows. It can
only be used as a merge tool with an existing base file. It cannot be
used without a base nor as a diff tool.
The documentation only mentions the slash '/' as command line option
prefix, which refused to work, but the parser also accepts the dash '-'
See http://code.google.com/p/msysgit/issues/detail?id=226
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
This patch goes on top of the current difftool/mergetool patches from David.
This is 'da/difftool' in the current 'pu' and in addition:
[PATCH] mergetool-lib: refactor run_mergetool and check_unchanged
[PATCH] mergetool-lib: specialize opendiff options when in diff mode
I couldn't recognize a special order so I put tortoisemerge at the end
of the list.
git-mergetool--lib.sh | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 6f0e8f7..4ad2cb5 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -51,10 +51,13 @@ check_unchanged () {
valid_tool () {
case "$1" in
- kdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge | diffuse)
+ kdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge | diffuse | tortoisemerge)
if test "$1" = "kompare" && ! diff_mode; then
return 1
fi
+ if test "$1" = "tortoisemerge" && ! merge_mode; then
+ return 1
+ fi
;; # happy
*)
if test -z "$(get_custom_cmd "$1")"; then
@@ -225,6 +228,16 @@ run_mergetool () {
fi
status=$?
;;
+ tortoisemerge)
+ if $base_present; then
+ touch "$BACKUP"
+ "$merge_tool_path" -base:"$BASE" -mine:"$LOCAL" -theirs:"$REMOTE" -merged:"$MERGED"
+ check_unchanged
+ else
+ echo "TortoiseMerge cannot be used without a base" 1>&2
+ status=1
+ fi
+ ;;
*)
if test -n "$merge_tool_cmd"; then
if merge_mode &&
--
1.6.2.2.428.gea44ab
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-04 13:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-04 13:18 [PATCH] mergetool-lib: add new merge tool TortoiseMerge Markus Heidelberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox