Skip to content

Commit 3798149

Browse files
Denton-Lgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1f0fc1d commit 3798149

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Documentation/SubmittingPatches

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ The "Copy commit summary" command of gitk can be used to obtain this
153153
format (with the subject enclosed in a pair of double-quotes), or this
154154
invocation of `git show`:
155155

156+
....
157+
git show -s --pretty=reference <commit>
158+
....
159+
160+
or, on an older version of Git without support for --pretty=reference:
161+
156162
....
157163
git show -s --date=short --pretty='format:%h (%s, %ad)' <commit>
158164
....

0 commit comments

Comments
 (0)