From: David Aguilar <davvid@gmail.com>
To: gitster@pobox.com
Cc: markus.heidelberg@web.de, charles@hashpling.org, git@vger.kernel.org
Subject: [PATCH v2] mergetool--lib: add new merge tool TortoiseMerge
Date: Sat, 4 Apr 2009 21:00:24 -0700 [thread overview]
Message-ID: <1238904024-11238-1-git-send-email-davvid@gmail.com> (raw)
From: Markus Heidelberg <markus.heidelberg@web.de>
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 is Markus' patch rebased on top of my latest refactoring
patch. It didn't apply cleanly so I figured I'd resolve the
merge myself.
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 dcd4516..268485a 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -46,10 +46,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_merge_tool_cmd "$1")"; then
@@ -220,6 +223,16 @@ run_merge_tool () {
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.1.469.gdffc1
next reply other threads:[~2009-04-05 4:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-05 4:00 David Aguilar [this message]
2009-04-05 5:10 ` [PATCH v2] mergetool--lib: add new merge tool TortoiseMerge Brian Gernhardt
2009-04-06 9:27 ` David Aguilar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1238904024-11238-1-git-send-email-davvid@gmail.com \
--to=davvid@gmail.com \
--cc=charles@hashpling.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=markus.heidelberg@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).