setlocalversion: Prevent tags from overflowing version string

Some post Linus tags are very long and they exceed the character
limit on the version string. This leads to compile errors like

 3.0.8-insert-your-reallllly-long-tag-name-here-13-g4b4e960-dirty
 exceeds 64 characters

Instead of putting the pretty printed name of the closest post
Linus tag, place the tag's object hash in the version string.
This should allow developers to easily run a git show on the
first hash to see what tag the build is based on. The version
will look like:

	3.0.8-gb080168-00006-g41f3bb3-dirty

meaning the kernel is based on v3.0.8 at the tag b080168 with 6
patches applied on top of that tag resulting in a commit with the
hash 41f3bb3 plus a dirty tree. Running "git show b080168"
should show the closest tag the tree was based on.

Change-Id: I8a26532f76aadf31654cb420ab789e90bd2fe828
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
1 file changed