From: Theodore Ts'o <tytso@mit•edu>
To: Junio C Hamano <junkio@cox•net>
Cc: git@vger•kernel.org, Theodore Ts'o <tytso@mit•edu>,
Arjen Laarhoven <arjen@yaph•org>
Subject: [PATCH] mergetool: Add support for Apple Mac OS X's opendiff command
Date: Thu, 29 Mar 2007 11:44:23 -0400 [thread overview]
Message-ID: <11751830651076-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <11751830653835-git-send-email-tytso@mit.edu>
Signed-off-by: Arjen Laarhoven <arjen@yaph•org>
Signed-off-by: "Theodore Ts'o" <tytso@mit•edu>
---
git-mergetool.sh | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/git-mergetool.sh b/git-mergetool.sh
index f73072a..b0d28fd 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -232,6 +232,16 @@ merge_file () {
check_unchanged
save_backup
;;
+ opendiff)
+ touch "$BACKUP"
+ if base_present; then
+ opendiff "$LOCAL" "$REMOTE" -ancestor "$BASE" -merge "$path" | cat
+ else
+ opendiff "$LOCAL" "$REMOTE" -merge "$path" | cat
+ fi
+ check_unchanged
+ save_backup
+ ;;
emerge)
if base_present ; then
emacs -f emerge-files-with-ancestor-command "$LOCAL" "$REMOTE" "$BASE" "$path"
@@ -282,7 +292,7 @@ done
if test -z "$merge_tool"; then
merge_tool=`git-config merge.tool`
case "$merge_tool" in
- kdiff3 | tkdiff | xxdiff | meld | emerge | vimdiff | "")
+ kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | "")
;; # happy
*)
echo >&2 "git config option merge.tool set to unknown tool: $merge_tool"
@@ -301,6 +311,8 @@ if test -z "$merge_tool" ; then
merge_tool=xxdiff
elif type meld >/dev/null 2>&1 && test -n "$DISPLAY"; then
merge_tool=meld
+ elif type opendiff >/dev/null 2>&1; then
+ merge_tool=opendiff
elif type emacs >/dev/null 2>&1; then
merge_tool=emerge
elif type vimdiff >/dev/null 2>&1; then
@@ -312,7 +324,7 @@ if test -z "$merge_tool" ; then
fi
case "$merge_tool" in
- kdiff3|tkdiff|meld|xxdiff|vimdiff)
+ kdiff3|tkdiff|meld|xxdiff|vimdiff|opendiff)
if ! type "$merge_tool" > /dev/null 2>&1; then
echo "The merge tool $merge_tool is not available"
exit 1
--
1.5.1.rc2.1.g8afe-dirty
next prev parent reply other threads:[~2007-03-29 15:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-29 15:44 [GIT PULL] git mergetool fixes Theodore Ts'o
2007-03-29 15:44 ` [PATCH] Fix minor formatting issue in man page for git-mergetool Theodore Ts'o
2007-03-29 15:44 ` [PATCH] mergetool: Replace use of "echo -n" with printf(3) to be more portable Theodore Ts'o
2007-03-29 15:44 ` [PATCH] mergetool: Don't error out in the merge case where the local file is deleted Theodore Ts'o
2007-03-29 15:44 ` [PATCH] mergetool: portability fix: don't assume true is in /bin Theodore Ts'o
2007-03-29 15:44 ` [PATCH] mergetool: portability fix: don't use reserved word function Theodore Ts'o
2007-03-29 15:44 ` [PATCH] mergetool: factor out common code Theodore Ts'o
2007-03-29 15:44 ` [PATCH] mergetool: Remove spurious error message if merge.tool config option not set Theodore Ts'o
2007-03-29 15:44 ` [PATCH] mergetool: Fix abort command when resolving symlinks and deleted files Theodore Ts'o
2007-03-29 15:44 ` Theodore Ts'o [this message]
2007-03-29 15:44 ` [PATCH] mergetool: Make git-rm quiet when resolving a deleted file conflict Theodore Ts'o
2007-03-29 15:44 ` [PATCH] mergetool: Clean up description of files and prompts for merge resolutions Theodore Ts'o
2007-03-29 22:29 ` Matthias Lederhofer
2007-03-30 2:54 ` Theodore Tso
2007-03-30 14:46 ` Randal L. Schwartz
2007-03-29 15:57 ` [PATCH] mergetool: Replace use of "echo -n" with printf(3) to be more portable Matthias Lederhofer
2007-03-29 17:09 ` Theodore Tso
2007-03-29 22:02 ` Junio C Hamano
2007-03-29 22:15 ` Theodore Tso
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=11751830651076-git-send-email-tytso@mit.edu \
--to=tytso@mit$(echo .)edu \
--cc=arjen@yaph$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=junkio@cox$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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