diff options
author | Junio C Hamano <junio@kernel.org> | 2011-05-25 23:59:59 +0000 |
---|---|---|
committer | Junio C Hamano <junio@kernel.org> | 2011-05-25 23:59:59 +0000 |
commit | f93530e842de298d91691d6b21225deabb4c2765 (patch) | |
tree | bdf8bf4a79b12ce0b72a684a1fb7d47c18c8fcc2 /gitattributes.txt | |
parent | 2a294cdddac356b905bb00d260fbd221d91af595 (diff) | |
download | git-htmldocs-f93530e842de298d91691d6b21225deabb4c2765.tar.gz |
Autogenerated HTML docs for v1.7.5.2-365-g5cfe4
Diffstat (limited to 'gitattributes.txt')
-rw-r--r-- | gitattributes.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gitattributes.txt b/gitattributes.txt index 15aebc606..412c55b54 100644 --- a/gitattributes.txt +++ b/gitattributes.txt @@ -593,6 +593,37 @@ and now produces better output), you can remove the cache manually with `git update-ref -d refs/notes/textconv/jpg` (where "jpg" is the name of the diff driver, as in the example above). +Choosing textconv versus external diff +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you want to show differences between binary or specially-formatted +blobs in your repository, you can choose to use either an external diff +command, or to use textconv to convert them to a diff-able text format. +Which method you choose depends on your exact situation. + +The advantage of using an external diff command is flexibility. You are +not bound to find line-oriented changes, nor is it necessary for the +output to resemble unified diff. You are free to locate and report +changes in the most appropriate way for your data format. + +A textconv, by comparison, is much more limiting. You provide a +transformation of the data into a line-oriented text format, and git +uses its regular diff tools to generate the output. There are several +advantages to choosing this method: + +1. Ease of use. It is often much simpler to write a binary to text + transformation than it is to perform your own diff. In many cases, + existing programs can be used as textconv filters (e.g., exif, + odt2txt). + +2. Git diff features. By performing only the transformation step + yourself, you can still utilize many of git's diff features, + including colorization, word-diff, and combined diffs for merges. + +3. Caching. Textconv caching can speed up repeated diffs, such as those + you might trigger by running `git log -p`. + + Marking files as binary ^^^^^^^^^^^^^^^^^^^^^^^ |