Skip to content

Commit f552e51

Browse files
dkagedalgitster
authored andcommitted
Update the documentation of the raw diff output format
This includes mentioning the initial hash output of diff-tree, and changes the header to "raw output format" which is more descriptive. Signed-off-by: David Kågedal <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 02944cc commit f552e51

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

Documentation/diff-format.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
The output format from "git-diff-index", "git-diff-tree",
1+
Raw output format
2+
-----------------
3+
4+
The raw output format from "git-diff-index", "git-diff-tree",
25
"git-diff-files" and "git diff --raw" are very similar.
36

47
These commands all compare two sets of things; what is
@@ -16,6 +19,9 @@ git-diff-tree [-r] <tree-ish-1> <tree-ish-2> [<pattern>...]::
1619
git-diff-files [<pattern>...]::
1720
compares the index and the files on the filesystem.
1821

22+
The "git-diff-tree" command begins its ouput by printing the hash of
23+
what is being compared. After that, all the commands print one output
24+
line per changed file.
1925

2026
An output line is formatted this way:
2127

Documentation/git-diff-files.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ omit diff output for unmerged entries and just show "Unmerged".
4343
-q::
4444
Remain silent even on nonexistent files
4545

46-
Output format
47-
-------------
46+
4847
include::diff-format.txt[]
4948

5049

Documentation/git-diff-index.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ include::diff-options.txt[]
3434
'git-diff-index' say that all non-checked-out files are up
3535
to date.
3636

37-
Output format
38-
-------------
3937
include::diff-format.txt[]
4038

4139
Operating Modes

Documentation/git-diff-tree.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ HEAD commits it finds, which is even more interesting.
159159

160160
in case you care).
161161

162-
Output format
163-
-------------
162+
164163
include::diff-format.txt[]
165164

166165

Documentation/git-diff.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ include::diff-options.txt[]
8484
the diff to the named paths (you can give directory
8585
names and get diff for all files under them).
8686

87-
Output format
88-
-------------
87+
8988
include::diff-format.txt[]
9089

9190
EXAMPLES

0 commit comments

Comments
 (0)