* [PATCH v2] mergetool--lib: add new merge tool TortoiseMerge
@ 2009-04-05 4:00 David Aguilar
2009-04-05 5:10 ` Brian Gernhardt
0 siblings, 1 reply; 3+ messages in thread
From: David Aguilar @ 2009-04-05 4:00 UTC (permalink / raw)
To: gitster; +Cc: markus.heidelberg, charles, git
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mergetool--lib: add new merge tool TortoiseMerge
2009-04-05 4:00 [PATCH v2] mergetool--lib: add new merge tool TortoiseMerge David Aguilar
@ 2009-04-05 5:10 ` Brian Gernhardt
2009-04-06 9:27 ` David Aguilar
0 siblings, 1 reply; 3+ messages in thread
From: Brian Gernhardt @ 2009-04-05 5:10 UTC (permalink / raw)
To: David Aguilar; +Cc: gitster, markus.heidelberg, charles, git
On Apr 5, 2009, at 12:00 AM, David Aguilar wrote:
> 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
Why is `case "$1"` being followed by two `if test "$1" =`s?
Wouldn't it be simpler to have separate case arms for them?
Especially with how long that list is getting...
~~ Brian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mergetool--lib: add new merge tool TortoiseMerge
2009-04-05 5:10 ` Brian Gernhardt
@ 2009-04-06 9:27 ` David Aguilar
0 siblings, 0 replies; 3+ messages in thread
From: David Aguilar @ 2009-04-06 9:27 UTC (permalink / raw)
To: Brian Gernhardt; +Cc: gitster, markus.heidelberg, charles, git
On 0, Brian Gernhardt <benji@silverinsanity.com> wrote:
>
> On Apr 5, 2009, at 12:00 AM, David Aguilar wrote:
>
>> valid_tool () {
>> case "$1" in
>> <lots-of-stuff>)
>> 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
>
> Why is `case "$1"` being followed by two `if test "$1" =`s?
> Wouldn't it be simpler to have separate case arms for them?
> Especially with how long that list is getting...
>
> ~~ Brian
It would. It wasn't until after the rewrite that I remembered
this email... oh well [PATCH v2 14/14] it is
--
David
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-06 9:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-05 4:00 [PATCH v2] mergetool--lib: add new merge tool TortoiseMerge David Aguilar
2009-04-05 5:10 ` Brian Gernhardt
2009-04-06 9:27 ` David Aguilar
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).