git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Document change in format of raw diff output format
@ 2018-11-22 10:58 Greg Hurrell
  2018-11-22 16:01 ` Jeff King
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Hurrell @ 2018-11-22 10:58 UTC (permalink / raw)
  To: git

I was troubleshooting some breakage in some code that consumes the output of `git log --raw` and looking on two machines with different versions of Git just now I discovered the output format has changed somewhere between v2.14.5:

:000000 100644 000000000... 9773b7718... A      content/snippets/1157.md

and v2.19.0:

:000000 100644 000000000 9773b7718 A    content/snippets/1157.md

A quick search turns up some patches related to the GIT_PRINT_SHA1_ELLIPSIS env variable, which can be used to force the old output format, and which landed in v2.16.0, I think.

Does it sound right that we should update the documentation in diff-format.txt to show what the new output format is? The examples all show the old output format, which isn't produced by default any more.

Something like the following? If the answer is yes, I can turn it into a real patch.

Cheers,
Greg


diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
index 706916c94c..33776459d0 100644
--- a/Documentation/diff-format.txt
+++ b/Documentation/diff-format.txt
@@ -26,12 +26,12 @@ line per changed file.
 An output line is formatted this way:

 ------------------------------------------------
-in-place edit  :100644 100644 bcd1234... 0123456... M file0
-copy-edit      :100644 100644 abcd123... 1234567... C68 file1 file2
-rename-edit    :100644 100644 abcd123... 1234567... R86 file1 file3
-create         :000000 100644 0000000... 1234567... A file4
-delete         :100644 000000 1234567... 0000000... D file5
-unmerged       :000000 000000 0000000... 0000000... U file6
+in-place edit  :100644 100644 bcd123456 012345678 M file0
+copy-edit      :100644 100644 abcd12345 123456789 C68 file1 file2
+rename-edit    :100644 100644 abcd12345 123456789 R86 file1 file3
+create         :000000 100644 000000000 123456789 A file4
+delete         :100644 000000 123456789 000000000 D file5
+unmerged       :000000 000000 000000000 000000000 U file6
 ------------------------------------------------

 That is, from the left to the right:
@@ -75,7 +75,7 @@ and it is out of sync with the index.
 Example:

 ------------------------------------------------
-:100644 100644 5be4a4...... 000000...... M file.c
+:100644 100644 5be4a4abc 000000000 M file.c
 ------------------------------------------------

 Without the `-z` option, pathnames with "unusual" characters are
@@ -100,7 +100,7 @@ from the format described above in the following way:
 Example:

 ------------------------------------------------
-::100644 100644 100644 fabadb8... cc95eb0... 4866510... MM     describe.c
+::100644 100644 100644 fabadb827 cc95eb0f2 4866510ea MM        describe.c
 ------------------------------------------------

 Note that 'combined diff' lists only files which were modified from


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-11-26  7:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-22 10:58 Document change in format of raw diff output format Greg Hurrell
2018-11-22 16:01 ` Jeff King
2018-11-23  9:09   ` Greg Hurrell
2018-11-23  9:09     ` [PATCH] doc: update diff-format.txt for removed ellipses Greg Hurrell
2018-11-24  2:50       ` Junio C Hamano
2018-11-24  9:29         ` [PATCH] doc: update diff-format.txt for removed ellipses in --raw Greg Hurrell
2018-11-26  7:02           ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).