]> git.ipfire.org Git - thirdparty/git.git/commitdiff
SubmittingPatches: use `--pretty=reference`
authorDenton Liu <liu.denton@gmail.com>
Wed, 20 Nov 2019 00:51:28 +0000 (16:51 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Nov 2019 04:33:37 +0000 (13:33 +0900)
Since Git was taught the `--pretty=reference` option, it is no longer
necessary to manually specify the format string to get the commit
reference. Teach users to use the new option while keeping the old
invocation around in case they have an older version of Git.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/SubmittingPatches

index a1aad133843674dc1622a971013721ce17c973cc..af9fb356ca516f3238c4ce659149c7ad897600d4 100644 (file)
@@ -153,6 +153,12 @@ The "Copy commit summary" command of gitk can be used to obtain this
 format (with the subject enclosed in a pair of double-quotes), or this
 invocation of `git show`:
 
+....
+       git show -s --pretty=reference <commit>
+....
+
+or, on an older version of Git without support for --pretty=reference:
+
 ....
        git show -s --date=short --pretty='format:%h (%s, %ad)' <commit>
 ....