Skip to content

Commit

Permalink
Update the documentation of the raw diff output format
Browse files Browse the repository at this point in the history
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 <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
David Kågedal authored and Junio C Hamano committed Jul 28, 2009
1 parent 02944cc commit f552e51
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
8 changes: 7 additions & 1 deletion Documentation/diff-format.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
The output format from "git-diff-index", "git-diff-tree",
Raw output format
-----------------

The raw output format from "git-diff-index", "git-diff-tree",
"git-diff-files" and "git diff --raw" are very similar.

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

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

An output line is formatted this way:

Expand Down
3 changes: 1 addition & 2 deletions Documentation/git-diff-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ omit diff output for unmerged entries and just show "Unmerged".
-q::
Remain silent even on nonexistent files

Output format
-------------

include::diff-format.txt[]


Expand Down
2 changes: 0 additions & 2 deletions Documentation/git-diff-index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ include::diff-options.txt[]
'git-diff-index' say that all non-checked-out files are up
to date.

Output format
-------------
include::diff-format.txt[]

Operating Modes
Expand Down
3 changes: 1 addition & 2 deletions Documentation/git-diff-tree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ HEAD commits it finds, which is even more interesting.

in case you care).

Output format
-------------

include::diff-format.txt[]


Expand Down
3 changes: 1 addition & 2 deletions Documentation/git-diff.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ include::diff-options.txt[]
the diff to the named paths (you can give directory
names and get diff for all files under them).

Output format
-------------

include::diff-format.txt[]

EXAMPLES
Expand Down

0 comments on commit f552e51

Please sign in to comment.