On Tue, Oct 07, 2008 at 08:15:45AM +0200, Matthieu Moy wrote: > One proposal: have a diff.<driver>.activate with several values: > > * "always": activate the diff driver in any porcelain > * "diff": activate it only for "git diff", as currently > * "singlefile": Johannes's heuristic proposal > > That way, one could say easily "activate exiftags filter all the time, > but MS-Word only when I request a diff for a single file", and this > leaves room for other values if the need be. Well, there's no room for > "use MS-Word native diff tool in git-gui but antiword/catdoc + > textconv in 'git log -p'" here, but do we want it? > > Or is all that just overkill? Actually, as soon as I read the first part of your mail I thought of the "ms-word vs antiword" situation. The example you gave seems plausible. And it seems to me that it is really a superset of the problem we are discussing. That is, gitattributes is really just saying "this is a 'foo' type file". And if we have a mechanism flexible enough to say "in this situation, this is how you handle 'foo' type files", then that would work as the basis for implementing these heuristics. For example, maybe you could set up some mapping like: git diff --diffdriver=foo,bar where a file with gitattribute diff=x would look for the driver config for x.foo, then x.bar, and then finally fall back to just x. Then you could easily have (ignoring the fact that I'm not sure about the config syntax for having _3_ section parts): git config diff.doc.graphical.command ms-word-diff-script git config diff.doc.textconv antiword and then git-gui would be configured to diff with: git diff --diffdriver=graphical whereas a regular "git diff" would always fall back to "diff.doc.textconv". Make sense? -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html