From: Gregory Jefferis <jefferis@gmail.com>
To: <git@vger.kernel.org>
Subject: Choosing a mergetool according to file type
Date: Fri, 26 Jun 2009 11:28:11 +0100 [thread overview]
Message-ID: <C66A614B.205E4%jefferis@gmail.com> (raw)
Dear all,
Is there a way to specify which mergetool is called for different files in a
repository in the same way that one can specify a diff tool using
.gitattributes? I would like to use a custom mergetool for certain binary
file types (MS Word dare I say it) but stick with my standard tool
(FileMerge.app) for regular files.
I have set up custom mergetool and diff commands in .git/config:
[mergetool "wordmergetool"]
path = /Users/jefferis/bin/
cmd = wordgitmerge "$PWD/$REMOTE" "$PWD/$BASE" "$PWD/$LOCAL"
"$PWD/$MERGED"
[diff "wordgitdiff"]
command = wordgitdiff
# adding the following to gitattributes handles the diff case
*.doc diff=wordgitdiff
# but of course this doesn't alter the mergetool that is called.
*.doc mergetool= wordmergetool
Many thanks for any suggestions,
Greg.
git version 1.6.3.2.202.g26c11
MacOS X 10.5.7
--
Gregory Jefferis, PhD
Division of Neurobiology
MRC Laboratory of Molecular Biology,
Hills Road,
Cambridge, CB2 0QH, UK.
http://www2.mrc-lmb.cam.ac.uk/NB/jefferis_g
http://www.neuroscience.cam.ac.uk/directory/profile.php?gsxej2
http://flybrain.stanford.edu
next reply other threads:[~2009-06-26 10:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-26 10:28 Gregory Jefferis [this message]
[not found] <4A44A66B.10906@viscovery.net>
2009-06-26 11:04 ` Choosing a mergetool according to file type Gregory Jefferis
2009-06-26 11:29 ` Johannes Sixt
2009-06-26 12:04 ` Matthieu Moy
2009-06-26 13:27 ` Gregory Jefferis
2009-06-26 13:51 ` Matthieu Moy
2009-06-26 16:57 ` Junio C Hamano
2009-06-26 17:43 ` Gregory Jefferis
2009-06-26 17:03 ` Gregory Jefferis
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=C66A614B.205E4%jefferis@gmail.com \
--to=jefferis@gmail.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.