summaryrefslogtreecommitdiff
path: root/Documentation/SubmittingPatches
diff options
context:
space:
mode:
authorLibravatar Denton Liu <liu.denton@gmail.com>2019-11-19 16:51:28 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-11-20 13:33:37 +0900
commit3798149a74f0c2b84b42b108b4fc6ce28c6ab023 (patch)
tree18b099ac9dbc667fb8948cdd6f85138e248c2558 /Documentation/SubmittingPatches
parentpretty: implement 'reference' format (diff)
downloadtgif-3798149a74f0c2b84b42b108b4fc6ce28c6ab023.tar.xz
SubmittingPatches: use `--pretty=reference`
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>
Diffstat (limited to 'Documentation/SubmittingPatches')
-rw-r--r--Documentation/SubmittingPatches6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index a1aad13384..af9fb356ca 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -154,6 +154,12 @@ 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>
....