summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-11-20 00:51:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-11-20 04:33:37 (GMT)
commit3798149a74f0c2b84b42b108b4fc6ce28c6ab023 (patch)
tree18b099ac9dbc667fb8948cdd6f85138e248c2558
parent1f0fc1db8599f87520494ca4f0e3c1b6fabdf997 (diff)
downloadgit-3798149a74f0c2b84b42b108b4fc6ce28c6ab023.zip
git-3798149a74f0c2b84b42b108b4fc6ce28c6ab023.tar.gz
git-3798149a74f0c2b84b42b108b4fc6ce28c6ab023.tar.bz2
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>
-rw-r--r--Documentation/SubmittingPatches6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index a1aad13..af9fb35 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>
....