From 3798149a74f0c2b84b42b108b4fc6ce28c6ab023 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Tue, 19 Nov 2019 16:51:28 -0800 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- Documentation/SubmittingPatches | 6 ++++++ 1 file changed, 6 insertions(+) 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 +.... + +or, on an older version of Git without support for --pretty=reference: + +.... git show -s --date=short --pretty='format:%h (%s, %ad)' .... -- 2.11.4.GIT