diff options
author | Denton Liu <liu.denton@gmail.com> | 2019-11-20 03:51:28 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-11-20 07:33:37 +0300 |
commit | 3798149a74f0c2b84b42b108b4fc6ce28c6ab023 (patch) | |
tree | 18b099ac9dbc667fb8948cdd6f85138e248c2558 /Documentation/SubmittingPatches | |
parent | 1f0fc1db8599f87520494ca4f0e3c1b6fabdf997 (diff) |
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/SubmittingPatches | 6 |
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> .... |