]> git.baikalelectronics.ru Git - kernel.git/commit
scripts/setlocalversion: factor out 12-chars hash construction
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 23 May 2021 03:14:27 +0000 (12:14 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 26 May 2021 19:01:51 +0000 (04:01 +0900)
commitb5e68f9f5022abc8051daa91ef4ec270b1b43655
treee4db85f1bf319fb49d10daec3bc8d379e3c8cf2f
parent4eb305dccde3a7001883e6792560e1bd942d7341
scripts/setlocalversion: factor out 12-chars hash construction

Both of if and else parts append exactly 12 hex chars, but in
different ways.

Factor out the else part because we need to support it without relying
on git-describe. Remove the --abbrev=12 option since we do not use the
hash from git-describe anyway.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
scripts/setlocalversion