diff options
| author | Justin Tobler <jltobler@gmail.com> | 2025-02-28 15:33:46 -0600 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-03-03 08:17:47 -0800 |
| commit | cf15095ec52f1e997ec9eef42bdf275d2a68fe66 (patch) | |
| tree | e413d7d7fc680a6d3d9da72960adad54acaee993 /Documentation | |
| parent | builtin: introduce diff-pairs command (diff) | |
| download | git-cf15095ec52f1e997ec9eef42bdf275d2a68fe66.tar.gz git-cf15095ec52f1e997ec9eef42bdf275d2a68fe66.zip | |
builtin/diff-pairs: allow explicit diff queue flush
The diffs queued from git-diff-pairs(1) are flushed when stdin is
closed. To enable greater flexibility, allow control over when the diff
queue is flushed by writing a single NUL byte on stdin between input
file pairs. Diff output between flushes is separated by a single NUL
byte.
Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/git-diff-pairs.adoc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/git-diff-pairs.adoc b/Documentation/git-diff-pairs.adoc index e31f2e2fbb..f99fcd1ead 100644 --- a/Documentation/git-diff-pairs.adoc +++ b/Documentation/git-diff-pairs.adoc @@ -17,6 +17,10 @@ in the NUL-terminated raw output format as generated by commands such as `git diff-tree -z -r --raw`. By default, the outputted diffs are computed and shown in the patch format when stdin closes. +A single NUL byte may be written to stdin between raw input lines to compute +file pair diffs up to that point instead of waiting for stdin to close. A NUL +byte is also written to the output to delimit between these batches of diffs. + Usage of this command enables the traditional diff pipeline to be broken up into separate stages where `diff-pairs` acts as the output phase. Other commands, such as `diff-tree`, may serve as a frontend to compute the raw |
