doc: git-diff: apply format changes to diff-format
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jean-Noël Avila committed
Nov 18, 2024 at 22:05 UTC
6ace09b2f96eb4c5f48cf8f26c2748c26f92b2c2
1 file changed
+21
-21
Documentation/diff-format.txt
+21
-21
@@ -1,25 +1,25 @@
1
Raw output format
2
-----------------
3
4
-The raw output format from "git-diff-index", "git-diff-tree",
5
-"git-diff-files" and "git diff --raw" are very similar.
4
+The raw output format from `git-diff-index`, `git-diff-tree`,
5
+`git-diff-files` and `git diff --raw` are very similar.
6
7
These commands all compare two sets of things; what is
8
compared differs:
9
10
-git-diff-index <tree-ish>::
11
- compares the <tree-ish> and the files on the filesystem.
10
+`git-diff-index <tree-ish>`::
11
+ compares the _<tree-ish>_ and the files on the filesystem.
12
13
-git-diff-index --cached <tree-ish>::
14
- compares the <tree-ish> and the index.
13
+`git-diff-index --cached <tree-ish>`::
14
+ compares the _<tree-ish>_ and the index.
15
16
-git-diff-tree [-r] <tree-ish-1> <tree-ish-2> [<pattern>...]::
16
+`git-diff-tree [-r] <tree-ish-1> <tree-ish-2> [<pattern>...]`::
17
compares the trees named by the two arguments.
18
19
-git-diff-files [<pattern>...]::
19
+`git-diff-files [<pattern>...]`::
20
compares the index and the files on the filesystem.
21
22
-The "git-diff-tree" command begins its output by printing the hash of
22
+The `git-diff-tree` command begins its output by printing the hash of
23
what is being compared. After that, all the commands print one output
24
line per changed file.
25
@@ -54,19 +54,19 @@ That is, from the left to the right:
54
55
Possible status letters are:
56
57
-- A: addition of a file
58
-- C: copy of a file into a new one
59
-- D: deletion of a file
60
-- M: modification of the contents or mode of a file
61
-- R: renaming of a file
62
-- T: change in the type of the file (regular file, symbolic link or submodule)
63
-- U: file is unmerged (you must complete the merge before it can
57
+- `A`: addition of a file
58
+- `C`: copy of a file into a new one
59
+- `D`: deletion of a file
60
+- `M`: modification of the contents or mode of a file
61
+- `R`: renaming of a file
62
+- `T`: change in the type of the file (regular file, symbolic link or submodule)
63
+- `U`: file is unmerged (you must complete the merge before it can
64
be committed)
65
-- X: "unknown" change type (most probably a bug, please report it)
65
+- `X`: "unknown" change type (most probably a bug, please report it)
66
67
-Status letters C and R are always followed by a score (denoting the
67
+Status letters `C` and `R` are always followed by a score (denoting the
68
percentage of similarity between the source and target of the move or
69
-copy). Status letter M may be followed by a score (denoting the
69
+copy). Status letter `M` may be followed by a score (denoting the
70
percentage of dissimilarity) for file rewrites.
71
72
The sha1 for "dst" is shown as all 0's if a file on the filesystem
@@ -86,7 +86,7 @@ verbatim and the line is terminated by a NUL byte.
86
diff format for merges
87
----------------------
88
89
-"git-diff-tree", "git-diff-files" and "git-diff --raw"
89
+`git-diff-tree`, `git-diff-files` and `git-diff --raw`
90
can take `-c` or `--cc` option
91
to generate diff output also for merge commits. The output differs
92
from the format described above in the following way:
@@ -128,7 +128,7 @@ other diff formats
128
------------------
129
130
The `--summary` option describes newly added, deleted, renamed and
131
-copied files. The `--stat` option adds diffstat(1) graph to the
131
+copied files. The `--stat` option adds `diffstat`(1) graph to the
132
output. These options can be combined with other options, such as
133
`-p`, and are meant for human consumption.
134