2015-03-25 16:09:49 +00:00
|
|
|
# NAME
|
|
|
|
|
2023-06-28 19:26:46 +00:00
|
|
|
git-annex diffdriver - git diff driver
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
2023-07-05 19:43:29 +00:00
|
|
|
git annex diffdriver --text [-- --opts --]
|
2023-06-28 19:26:46 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
git annex diffdriver `-- cmd --opts --`
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
2023-06-28 19:26:46 +00:00
|
|
|
Normally, `git diff` when run on annexed files displays the changes that
|
|
|
|
are staged in git, eg annex symlinks and pointers. This command allows
|
|
|
|
`git diff` to diff the content of annexed files instead.
|
|
|
|
|
|
|
|
This command can be used either as a simple text differ,
|
|
|
|
or as a shim that runs an external git diff driver.
|
2015-03-25 16:09:49 +00:00
|
|
|
|
2023-06-28 19:26:46 +00:00
|
|
|
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 `.gitattributes` to contain eg `*.txt diff=annextextdiff`
|
2023-07-03 11:19:45 +00:00
|
|
|
and setting `git config diff.annextextdiff.command "git annex diffdriver --text"`.
|
2023-06-28 19:26:46 +00:00
|
|
|
|
|
|
|
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 `GIT_EXTERNAL_DIFF` and
|
2018-02-06 17:45:14 +00:00
|
|
|
gitattributes(5)'s documentation of external diff drivers.
|
|
|
|
|
2023-06-28 19:26:46 +00:00
|
|
|
Normally, when using `git diff` 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 --"
|
2018-02-06 17:45:14 +00:00
|
|
|
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
|
2015-03-25 16:09:49 +00:00
|
|
|
to it. Note the trailing "--", which is required.
|
|
|
|
|
2023-06-28 19:26:46 +00:00
|
|
|
For example, to use the j-c-diff program as the external diff driver,
|
|
|
|
set `GIT_EXTERNAL_DIFF="git-annex diffdriver -- j-c-diff --"`
|
2015-03-25 16:09:49 +00:00
|
|
|
|
2021-05-10 19:00:13 +00:00
|
|
|
# OPTIONS
|
|
|
|
|
2023-06-28 19:26:46 +00:00
|
|
|
To diff text files with diff(1), use the "--text" option.
|
2023-07-05 19:43:29 +00:00
|
|
|
To pass additional options to diff(1), use eg "--text -- --color --"
|
2023-06-28 19:26:46 +00:00
|
|
|
|
|
|
|
To use an external diff driver command, the options must start with
|
|
|
|
"--" followed by the diff driver command, its options, and another "--"
|
2021-05-10 19:00:13 +00:00
|
|
|
|
|
|
|
Also the [[git-annex-common-options]](1) can be used.
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
[[git-annex]](1)
|
|
|
|
|
|
|
|
# AUTHOR
|
|
|
|
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|