<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/diff-format.txt, branch v2.48.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.48.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.48.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-11-19T03:31:04Z</updated>
<entry>
<title>doc: git-diff: apply format changes to diff-format</title>
<updated>2024-11-19T03:31:04Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2024-11-18T22:05:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6ace09b2f96eb4c5f48cf8f26c2748c26f92b2c2'/>
<id>urn:sha1:6ace09b2f96eb4c5f48cf8f26c2748c26f92b2c2</id>
<content type='text'>
Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-format.txt: correct misleading wording</title>
<updated>2022-06-13T18:57:03Z</updated>
<author>
<name>Philippe Blain</name>
<email>levraiphilippeblain@gmail.com</email>
</author>
<published>2022-06-13T12:29:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b396c899f946604328d863154c4c988e1d777c1'/>
<id>urn:sha1:3b396c899f946604328d863154c4c988e1d777c1</id>
<content type='text'>
Near the end of the "Raw output format" section, an example shows the
output of 'git diff-files' for a tracked file modified on disk but not
yet added to the index. However the wording is:

    &lt;sha1&gt; is shown as all 0's if a file is new on the filesystem
    and it is out of sync with the index.

which is confusing since it can be understood to mean that 'file' is a
new, yet untracked file, in which case 'git diff-files' does not care
about it at all.

When this example was introduced all the way back in c64b9b8860
(Reference documentation for the core git commands., 2005-05-05), 'old'
and 'new' referred to the two entities being compared, depending on the
command being used (diff-index, diff-tree or diff-files - which at the
time were diff-cache, diff-tree and show-diff). The wording used at the
time was:

    &lt;new-sha1&gt; is shown as all 0's if new is a file on the
    filesystem and it is out of sync with the cache.

This section was reworked in 81e50eabf0 ([PATCH] The diff-raw
format updates., 2005-05-21) and the mention of the meaning of 'new' and
'old' was removed. Then in f73ae1fc5d (Some typos and light editing of
various manpages, 2005-10-05), the wording was changed to what it is
now.

In addition, in b6d8f309d9 ([PATCH] diff-raw format update take #2.,
2005-05-23), the section was further reworked and did not use '&lt;sha1&gt;'
anymore, making the example the sole user of this token.

Rework the introductory sentence of the example to instead refer to
'sha1 for "dst"', which is what the text description above it uses, and
fix the wording so that we do not mention a "new file".

While at it, also tweak the wording used in the description of the raw
format to explicitely state that all 0's are used for the destination
hash if the working tree is out of sync with the index, instead of the
more vague "look at worktree".

Signed-off-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-format.txt: dst can be 0* SHA-1 when path is deleted, too</title>
<updated>2022-06-13T18:23:13Z</updated>
<author>
<name>Philippe Blain</name>
<email>levraiphilippeblain@gmail.com</email>
</author>
<published>2022-06-13T12:29:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7922a17d4da969c70d9382206244b6be0a7a3475'/>
<id>urn:sha1:7922a17d4da969c70d9382206244b6be0a7a3475</id>
<content type='text'>
"dst" can legitimately be "0\{40\}" for a creation patch, e.g. when
the stat information is stale, but it falls into "look at work tree"
case.  The original description in b6d8f309 ([PATCH] diff-raw format
update take #2., 2005-05-23) forgot that deletion also makes the
"dst" 0* SHA-1.

Signed-off-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Documentation/diff-format: state in which cases porcelain status is T</title>
<updated>2021-10-04T20:07:18Z</updated>
<author>
<name>Johannes Altmanninger</name>
<email>aclopte@gmail.com</email>
</author>
<published>2021-10-04T19:00:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=55e7f52b407dffc8aead377bff2ca3356dfde3e6'/>
<id>urn:sha1:55e7f52b407dffc8aead377bff2ca3356dfde3e6</id>
<content type='text'>
Porcelain status letter T is documented as "type of the file", which
is technically correct but not enough information for users that are
not so familiar with this term from systems programming. In particular,
given that the only supported file types are "regular file", "symbolic
link" and "submodule", the term "file type" is surely opaque to the
many(?) users who are not aware that symbolic links can be tracked -
I thought that a "chmod +x" could cause the T status (wrong, it's M).

Explicitly document the three file types so users know if/how they
want to handle this.

Signed-off-by: Johannes Altmanninger &lt;aclopte@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: indent multi-line items in list</title>
<updated>2019-12-13T20:18:07Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2019-12-12T20:46:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=df5be016699e5495c0360e727e32f8d73369af5b'/>
<id>urn:sha1:df5be016699e5495c0360e727e32f8d73369af5b</id>
<content type='text'>
Although Asciidoc allows to not indent following lines in a list item,
it is clearer and safer to follow the recommended rule.

Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>log,diff-tree: add --combined-all-paths option</title>
<updated>2019-02-08T04:15:25Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2019-02-08T01:12:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d76ce4f734634f47b467b7f6eea11d6bf8c81f22'/>
<id>urn:sha1:d76ce4f734634f47b467b7f6eea11d6bf8c81f22</id>
<content type='text'>
The combined diff format for merges will only list one filename, even if
rename or copy detection is active.  For example, with raw format one
might see:

  ::100644 100644 100644 fabadb8 cc95eb0 4866510 MM	describe.c
  ::100755 100755 100755 52b7a2d 6d1ac04 d2ac7d7 RM	bar.sh
  ::100644 100644 100644 e07d6c5 9042e82 ee91881 RR	phooey.c

This doesn't let us know what the original name of bar.sh was in the
first parent, and doesn't let us know what either of the original names
of phooey.c were in either of the parents.  In contrast, for non-merge
commits, raw format does provide original filenames (and a rename score
to boot).  In order to also provide original filenames for merge
commits, add a --combined-all-paths option (which must be used with
either -c or --cc, and is likely only useful with rename or copy
detection active) so that we can print tab-separated filenames when
renames are involved.  This transforms the above output to:

  ::100644 100644 100644 fabadb8 cc95eb0 4866510 MM	desc.c	desc.c	desc.c
  ::100755 100755 100755 52b7a2d 6d1ac04 d2ac7d7 RM	foo.sh	bar.sh	bar.sh
  ::100644 100644 100644 e07d6c5 9042e82 ee91881 RR	fooey.c	fuey.c	phooey.c

Further, in patch format, this changes the from/to headers so that
instead of just having one "from" header, we get one for each parent.
For example, instead of having

  --- a/phooey.c
  +++ b/phooey.c

we would see

  --- a/fooey.c
  --- a/fuey.c
  +++ b/phooey.c

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: update diff-format.txt for removed ellipses in --raw</title>
<updated>2018-11-26T06:59:14Z</updated>
<author>
<name>Greg Hurrell</name>
<email>greg@hurrell.net</email>
</author>
<published>2018-11-24T09:29:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f9ea6e45edb71d83630f307cd0cba8dc52f48374'/>
<id>urn:sha1:f9ea6e45edb71d83630f307cd0cba8dc52f48374</id>
<content type='text'>
Since 7cb6ac1e4b ("diff: diff_aligned_abbrev: remove ellipsis after
abbreviated SHA-1 value", 2017-12-03), the "--raw" format of diff
does not add ellipses in an attempt to align the output, but the
documentation was not updated to reflect this.

Signed-off-by: Greg Hurrell &lt;greg@hurrell.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Documentation: improve description for core.quotePath</title>
<updated>2017-03-02T19:40:51Z</updated>
<author>
<name>Andreas Heiduk</name>
<email>asheiduk@gmail.com</email>
</author>
<published>2017-03-02T19:03:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=860cd699c285f02937a2edbdb78e8231292339a5'/>
<id>urn:sha1:860cd699c285f02937a2edbdb78e8231292339a5</id>
<content type='text'>
Linking the description for pathname quoting to the configuration
variable "core.quotePath" removes inconstistent and incomplete
sections while also giving two hints how to deal with it: Either with
"-c core.quotePath=false" or with "-z".

Signed-off-by: Andreas Heiduk &lt;asheiduk@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: typeset long command-line options as literal</title>
<updated>2016-06-28T15:36:45Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2016-06-28T11:40:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bcf9626a71a0d90be65acc265ad0ec488d95d6ed'/>
<id>urn:sha1:bcf9626a71a0d90be65acc265ad0ec488d95d6ed</id>
<content type='text'>
Similarly to the previous commit, use backquotes instead of
forward-quotes, for long options.

This was obtained with:

  perl -pi -e "s/'(--[a-z][a-z=&lt;&gt;-]*)'/\`\$1\`/g" *.txt

and manual tweak to remove false positive in ascii-art (o'--o'--o' to
describe rewritten history).

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: typeset short command-line options as literal</title>
<updated>2016-06-28T15:20:52Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2016-06-28T11:40:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=23f8239bbe0a893bd8754a03e9d4fda62804ac14'/>
<id>urn:sha1:23f8239bbe0a893bd8754a03e9d4fda62804ac14</id>
<content type='text'>
It was common in our documentation to surround short option names with
forward quotes, which renders as italic in HTML. Instead, use backquotes
which renders as monospace. This is one more step toward conformance to
Documentation/CodingGuidelines.

This was obtained with:

  perl -pi -e "s/'(-[a-z])'/\`\$1\`/g" *.txt

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
