Community
Participate
Working Groups
JGit needs to be capable to work with difftools defined in .gitattributes.
New Gerrit change created: https://git.eclipse.org/r/153906
(In reply to Mykola Zakharchuk from comment #0) > JGit needs to be capable to work with difftools defined in .gitattributes. See bug 552838 comment 1 for a longer explanation & UI prototype that needs this change in JGit.
That is a very needed feature! Do you know if it's supported as "difftool" in .gitaatributes in native C-Git? I cannot find any documentation about it...
(In reply to Andre Bossert from comment #3) > Do you know if it's supported as "difftool" > in .gitaatributes in native C-Git? I cannot find any documentation about > it... I think we've invented the "git attributes" part because we didn't found anything existing in this area that would match. Note: https://git-scm.com/docs/gitattributes has following section: -------------- Defining an external diff driver The definition of a diff driver is done in gitconfig, not gitattributes file, so strictly speaking this manual page is a wrong place to talk about it. However… To define an external diff driver jcdiff, add a section to your $GIT_DIR/config file (or $HOME/.gitconfig file) like this: [diff "jcdiff"] command = j-c-diff When Git needs to show you a diff for the path with diff attribute set to jcdiff, it calls the command you specified with the above configuration, i.e. j-c-diff, with 7 parameters, just like GIT_EXTERNAL_DIFF program is called. See git[1] for details. -------------- This is completely different to what do *we* need. We don't want the tool to *modify* the diff output, we want *another* tool to be used during diff/merge on top of *unmodified* diff output. There were also existing tool definitions in gitconfig (https://git-scm.com/docs/git-difftool & https://git-scm.com/docs/git-mergetool), so all what we "invented" was to combine existing definitions of difftool / mergetool from gitconfig with generic possibility to specify any custom git attributes. So we came in with the following example ----- .gitconfig -------- [difftool "customTool"] cmd = /home/user/diff_tool.sh - $LOCAL - - $REMOTE ------------------------- ----- .gitattributes -------- attributes: *.txt difftool=customTool -----------------------------
OK, i understand, we need the same feature :) I know all this "diff" and "merge" driver stuff. We define own merge drivers for rhapsody in .gitattributes and they are used during merge. Buf for difftool usage we need script that decides what difftool should be used during "git difftool". May be it can be added to C-Git too...
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/166943
Gerrit change https://git.eclipse.org/r/c/jgit/jgit/+/166943 was merged to [master]. Commit: http://git.eclipse.org/c/jgit/jgit.git/commit/?id=c32694e5ae98e5c1373afcb535a76d37e5d82a29