Skip to content

Commit fb2ffa7

Browse files
Denton-Lgitster
authored andcommitted
SubmittingPatches: remove dq from commit reference
Quoting SZEDER Gábor[1], SubmittingPatches is simply wrong: our de-facto standard format for referencing other commits does not enclose the subject in a pair of double-quotes: $ git log v2.24.0 |grep -E '[0-9a-f]{7} \("' |wc -l 785 $ git log v2.24.0 |grep -E '[0-9a-f]{7} \([^"]' |wc -l 2276 Those double-quotes don't add any value to the references, but they result in weird looking references for 1083 of our commits whose subject lines happen to end with double-quotes, e.g.: f23a465 ("hashmap_get{,_from_hash} return "struct hashmap_entry *"", 2019-10-06) and without those unnecessary pair of double-quotes we would have ~3000 more commits whose summary would fit on a single line. Remove references to the enclosing double-quotes from SubmittingPatches since our de-facto standard for referencing commits does not actually use them. [1]: cf. <20191114011048.GS4348@szeder.dev> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent bae74c9 commit fb2ffa7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Documentation/SubmittingPatches

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,19 @@ archive, summarize the relevant points of the discussion.
142142

143143
[[commit-reference]]
144144
If you want to reference a previous commit in the history of a stable
145-
branch, use the format "abbreviated hash (subject, date)",
146-
with the subject enclosed in a pair of double-quotes, like this:
145+
branch, use the format "abbreviated hash (subject, date)", like this:
147146

148147
....
149-
Commit f86a374 ("pack-bitmap.c: fix a memleak", 2015-03-30)
148+
Commit f86a374 (pack-bitmap.c: fix a memleak, 2015-03-30)
150149
noticed that ...
151150
....
152151

153152
The "Copy commit summary" command of gitk can be used to obtain this
154-
format, or this invocation of `git show`:
153+
format (with the subject enclosed in a pair of double-quotes), or this
154+
invocation of `git show`:
155155

156156
....
157-
git show -s --date=short --pretty='format:%h ("%s", %ad)' <commit>
157+
git show -s --date=short --pretty='format:%h (%s, %ad)' <commit>
158158
....
159159

160160
[[git-tools]]

0 commit comments

Comments
 (0)