Re: [PATCH v2 09/10] pretty: implement 'summary' format
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Nov 14, 2019, 01:10 UTC
- Message-ID
- <20191114011048.GS4348@szeder.dev>
- In-Reply-To
- <e74eab6d21f655698ef8b6e1286b44ea070a7af7.1573241590.git.liu.denton@gmail.com>
On Fri, Nov 08, 2019 at 12:08:34PM -0800, Denton Liu wrote:
Show 15 quoted lines
> The standard format for referencing other commits within some projects
> (such as git.git) is the summary format. This is described in
> Documentation/SubmittingPatches as
>
> If you want to reference a previous commit in the history of a stable
> branch, use the format "abbreviated hash (subject, date)",
> with the subject enclosed in a pair of double-quotes, like this:
>
> ....
> Commit f86a374 ("pack-bitmap.c: fix a memleak", 2015-03-30)
> noticed that ...
> ....
>
> Since this format is so commonly used, standardize it as a pretty
> format.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
2276Those 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.:
f23a465132 ("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.