On 2016-07-20 12:54, Nicholas Mc Guire wrote:
> On Wed, Jul 20, 2016 at 12:35:59PM +0200, Jan Kiszka wrote:
>> On 2016-07-20 12:19, Nicholas Mc Guire wrote:
>>> To improve the review of bug-fixes a standardized reference to the
>>> bug-introducing commit, which the Fixes: tag provides, can make life
>>> a lot simpler - and it allows some level of automation.
>>>
>>> While strongly adviseable it is only recommended and not set to mandatory
>>> notably as it is better *not* to reference a commit if unsure than to
>>> reference a wrong commit.
>>>
>>> Signed-off-by: Nicholas Mc Guire <[email protected]>
>>> ---
>>>  CONTRIBUTING.md |    6 ++++++
>>>  1 file changed, 6 insertions(+)
>>>
>>> diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
>>> index 40655ce..98c7527 100644
>>> --- a/CONTRIBUTING.md
>>> +++ b/CONTRIBUTING.md
>>> @@ -39,6 +39,12 @@ Contribution Checklist
>>>        your work" in 
>>> https://www.kernel.org/doc/Documentation/SubmittingPatches
>>>      - check with your employer when not working on your own!
>>>  
>>> +- add Fixes: to all bug-fix commits [*recommended*]
>>> +    - the Fixes: tag format shall be:
>>> +        Fixes: 12-byte-hash ("subject of bug-introducting commit")
>>
>> Just out of curiosity: Where do these 12 bytes come from? Tools use 8, I
>> usually use 10 to be safer. 12 is just even more safer against collisions?
>>
> 
> Documentation/SubmittingPatches
> 
> <snip>
> If your patch fixes a bug in a specific commit, e.g. you found an issue using
> git-bisect, please use the 'Fixes:' tag with the first 12 characters of the   
>   
> SHA-1 ID, and the one line summary.  For example:

Ah, always good to have someone else to blame ;)

> 
>         Fixes: e21d2170f366 ("video: remove unnecessary 
> platform_set_drvdata()")
> <snip>
> 
> and here is the distribution of fixes tags hash length for v4.4...v4.4.13
> for all those who love statistical evidence :)
> 
>     Hash length used variations
>     count  hash-len
>       7    xxxxxxx
>      11    xxxxxxxx
>       8    xxxxxxxxx
>      14    xxxxxxxxxx
>       6    xxxxxxxxxxx
>     484    xxxxxxxxxxxx    <--- 12 the proper value I guess...
>      31    xxxxxxxxxxxxx
>       4    xxxxxxxxxxxxxx
>       4    xxxxxxxxxxxxxxx
>       5    xxxxxxxxxxxxxxxx
>       1    xxxxxxxxxxxxxxxxxxxx
>      19    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

That is "used", not necessarily "needed". I was curious about the number
of collisions we already see (or fear) in something as big as Linux,
e.g., when using hash abbreviations.

Anyway, 12 is fine, will merge.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to