git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Choosing a mergetool according to file type
@ 2009-06-26 10:28 Gregory Jefferis
  0 siblings, 0 replies; 9+ messages in thread
From: Gregory Jefferis @ 2009-06-26 10:28 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <4A44A66B.10906@viscovery.net>]

end of thread, other threads:[~2009-06-26 17:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-26 10:28 Choosing a mergetool according to file type Gregory Jefferis
     [not found] <4A44A66B.10906@viscovery.net>
2009-06-26 11:04 ` 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

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).