Re: [PATCH] checkpatch: Also accept commit ids with 13-40 chars of sha1

From: Joe Perches
Date: Tue Dec 05 2023 - 15:05:52 EST


On Tue, 2023-12-05 at 20:34 +0100, Geert Uytterhoeven wrote:
> Documentation/dev-tools/checkpatch.rst says:
>
> **GIT_COMMIT_ID**
> The proper way to reference a commit id is:
> commit <12+ chars of sha1> ("<title line>")

It's not just checkpatch.

Documentation/process/submitting-patches.rst:``git bisect``, please use the 'Fixes:' tag with the first 12 characters of


So that would need to be updated as well.

And 12 still has quite some headroom.

$ git rev-list --all --abbrev=0 --abbrev-commit | \
awk '{ a[length] += 1 } END { for (len in a) print len, a[len] }'
5 107
6 684276
7 505734
8 41769
9 2665
10 174
11 8