]> git.proxmox.com Git - mirror_zfs.git/commit
Make gitrev more reliable
authorMatthew Ahrens <mahrens@delphix.com>
Mon, 22 Oct 2018 19:23:30 +0000 (12:23 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 22 Oct 2018 19:23:30 +0000 (12:23 -0700)
commitda4f331b4136a50e41ce3bb639ad48e519611210
tree5ac72d36858f6142d64f916cd88538d1ae300150
parentae3d8491427343904c66d69ba94731553727eb26
Make gitrev more reliable

In some build methods, the gitrev is unnecessarily set to "unknown".
We can improve this by changing the gitrev to use
`git describe --always --long --dirty`.

This gets the revision even when no tag matches (--always).  It prints
the hash even when it exactly matches a tag (--long).  And if there are
uncommitted changes, it appends "-dirty", rather than failing (--dirty).

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Thode <prometheanfire@gentoo.org>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #8034
scripts/make_gitrev.sh