Skip to content

Some more "Raw output format" doc improvements#2304

Open
phil-blain wants to merge 3 commits into
git:masterfrom
phil-blain:diff-raw-format-doc
Open

Some more "Raw output format" doc improvements#2304
phil-blain wants to merge 3 commits into
git:masterfrom
phil-blain:diff-raw-format-doc

Conversation

@phil-blain
Copy link
Copy Markdown
Contributor

Here are some small improvements to the "Raw output format" documentation that I noticed while working on another topic.

In the "Raw output format" section, we start by mentioning that 'git
diff-tree' prints the hashes of what is being compared. This is only
true in --stdin mode, and is already mentioned in the description of
'--stdin' in git-diff-tree.adoc. Remove this sentence such that we only
focus on the common output between diff-tree, diff-index, diff-files and
diff --raw.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
Since 10637b8 (diff-files: -1/-2/-3 to diff against unmerged stage.,
2005-11-29), for unmerged entries 'git diff-files' print both an
"unmerged" line ('U'), as well as an "in-place edit" line ('M')
comparing stage 2 (by default) with the working tree. The "Raw output
format" documentation however mentions that all commands print a single
line per changed file. Adjust diff-format.adoc to also mention this
special case, for completeness.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
…only

In the "Raw output format" section, we mention that the 'mode' and
'sha1' for "src" and "dst" are 0* if "(creation|deletion) or unmerged".
For unmerged entries, 'mode' and 'sha1' are in fact 0* only when we are
looking at the index, i.e. on the left side for 'git diff-files' and on
the right side for 'git diff-index --cached'. Be more precise by
mentioning this, and while at it uniformize the wording of the "work
tree out of sync with the index" case.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
@phil-blain
Copy link
Copy Markdown
Contributor Author

/submit

@gitgitgadget-git
Copy link
Copy Markdown

Submitted as pull.2304.git.git.1778860091.gitgitgadget@gmail.com

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-git-2304/phil-blain/diff-raw-format-doc-v1

To fetch this version to local tag pr-git-2304/phil-blain/diff-raw-format-doc-v1:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-git-2304/phil-blain/diff-raw-format-doc-v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant