git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Aguilar <davvid@gmail.com>
To: gitster@pobox.com, markus.heidelberg@web.de, marcin.zalewski@gmail.com
Cc: charles@hashpling.org, git@vger.kernel.org,
	David Aguilar <davvid@gmail.com>
Subject: [PATCH] mergetool--lib: specialize diff options for emerge and ecmerge
Date: Sat,  2 May 2009 01:57:21 -0700	[thread overview]
Message-ID: <1241254641-54338-1-git-send-email-davvid@gmail.com> (raw)

The ecmerge documentation mentions the following form:

	ecmerge --mode=diff2 $1 $2

Since git-difftool is about diffing, we should use that
instead of --mode=merge2.  Likewise, this drops the
$MERGED argument to emerge, as discussed on the git list
($gmane/117930).

Signed-off-by: David Aguilar <davvid@gmail.com>
---

I tested the emacs (emerge) bit, but I'm not an emacs
user and I didn't really see any difference with or
without the patch.  Dropping $MERGED seems like the
right thing to do nonetheless.

In emerge/emacs mode, we still end up seeing the
merge pane.  My emacs-fu is not sophisticated
enough to know how to inhibit the merge pane
(if that's even something we'd want to do).


Regarding ecmerge:  I found the --mode=diff2
flag by reading their documenation:

http://www.elliecomputing.com/OnlineDoc/ecmerge_EN/52335623.asp

I don't have ecmerge installed at all, so I'm just
going by the book on this one.  It *looks* correct,
and probably is, but let it be known that I
haven't tested the ecmerge snippet myself.

 git-mergetool--lib.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index a16a279..8b5e6a8 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -228,8 +228,8 @@ run_merge_tool () {
 			fi
 			check_unchanged
 		else
-			"$merge_tool_path" "$LOCAL" "$REMOTE" \
-				--default --mode=merge2 --to="$MERGED"
+			"$merge_tool_path" --default --mode=diff2 \
+				"$LOCAL" "$REMOTE"
 		fi
 		;;
 	emerge)
@@ -248,7 +248,7 @@ run_merge_tool () {
 			status=$?
 		else
 			"$merge_tool_path" -f emerge-files-command \
-				"$LOCAL" "$REMOTE" "$(basename "$MERGED")"
+				"$LOCAL" "$REMOTE"
 		fi
 		;;
 	tortoisemerge)
-- 
1.6.3.rc3.40.g75b44

             reply	other threads:[~2009-05-02  8:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-02  8:57 David Aguilar [this message]
2009-05-02 19:46 ` [PATCH] mergetool--lib: specialize diff options for emerge and ecmerge David Aguilar
2009-05-03  6:27   ` Markus Heidelberg
2009-05-03 18:21     ` David Aguilar
2009-05-03 19:12       ` Markus Heidelberg
2009-05-03 20:34         ` David Aguilar
2009-05-03 18:47   ` Marcin Zalewski

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=1241254641-54338-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=marcin.zalewski@gmail.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).