.TH git-annex-diffdriver 1 .SH NAME git-annex-diffdriver \- git diff driver .PP .SH SYNOPSIS \fBgit annex diffdriver [\-\-get,\-\-text] [\-\- \-\-diffopts \-\-]\fP .PP \fBgit annex diffdriver \-\- cmd \-\-cmdopts \-\-\fP .PP .SH DESCRIPTION Normally, \fBgit diff\fP when run on annexed files displays the changes that are staged in git, eg annex symlinks and pointers. This command allows \fBgit diff\fP to diff the content of annexed files instead. .PP This command can be used either as a simple text differ, or as a shim that runs an external git diff driver. .PP If some of your annexed files are textual in form, and can be usefully diffed with diff(1), you can configure git to use this command to diff them, by configuring \fB.gitattributes\fP to contain eg \fB*.txt diff=annextextdiff\fP and setting \fBgit config diff.annextextdiff.command "git annex diffdriver \-\-text"\fP. .PP If your annexed files are not textual in form, you will need an external diff driver program that is able to diff the file format(s) you use. See git's documentation of \fBGIT_EXTERNAL_DIFF\fP and gitattributes(5)'s documentation of external diff drivers. .PP Normally, when using \fBgit diff\fP with an external diff driver, it will not see the contents of annexed files, since git passes to it the git-annex symlinks or pointer files. This command works around the problem, by running the real external diff driver, and passing it the paths to the annexed content. Configure git to use "git-annex diffdriver \-\- cmd params \-\-" as the external diff driver, where cmd is the external diff driver you want it to run, and params are any extra parameters to pass to it. Note the trailing "\-\-", which is required. .PP For example, to use the j\-c\-diff program as the external diff driver, set \fBGIT_EXTERNAL_DIFF="git-annex diffdriver \-\- j\-c\-diff \-\-"\fP .PP .SH OPTIONS To get the contents of annexed files from remotes when they are not already present, use the \fB\-\-get\fP option. The file contents will remain in the repository for later use until dropped in the usual ways. .PP To diff text files with diff(1), use the \fB\-\-text\fP option. To pass additional options to diff(1), use eg "\-\-text \-\- \-\-color \-\-" .PP To use an external diff driver command, the options must start with "\-\-" followed by the diff driver command, its options, and another "\-\-" .PP Also the git-annex\-common\-options(1) can be used. .PP .SH SEE ALSO git-annex(1) .PP .SH AUTHOR Joey Hess .PP .PP