Hi,
For custom diff and merge drivers, it's easy to add them so that upon "git
diff" or "git merge" the appropriate diff/merge driver is called (by using
gitattributes to execute the required diff/merge driver):
.gitattributes:
*.bin diff=binDiff
*.txt diff=txtDiff
.gitconfig:
[diff "binDiff"]
command = binDiff
[diff "txtDiff"]
command = txtDiff
I'd really like similar behaviour for difftool and mergetool (git difftool
<path>...) without having to specify the difftool with (git difftool -t
myDiffTool <path>...). Something like this:
.gitattributes:
*.bin difftool=binDiff
*.txt difftool=txtDiff
.gitconfig:
[difftool "binDiff"]
path = binDiff
[difftool "txtDiff"]
path = txtDiff
I just found this thread which suggests this would be possible:
http://git.661346.n2.nabble.com/Choosing-a-mergetool-according-to-file-type-tp3160762p3162660.html
Do I just go ahead and give it a go following
https://git-scm.com/docs/MyFirstContribution? The main downside to this
suggestion is that for file types that care about having custom drivers the
attributes file might get quite cluttered:
.gitattributes:
*.bin diff=binDiff merge=binMerge difftool=binDiffTool
mergetool=binMergeTool
But I can't see another way of specifying this without mixing the diff and
difftool driver configs, which is best to avoid.
Regards,
Laurence
--
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/git-users/c0d23d1c-cf62-424a-9092-2363e1021681%40googlegroups.com.