scripts: fix ABI validator when revision is a tag

Commit 9cbae2aa64eb managed to break the only previously supported
case where a tag is used as a revision, due to git show output
differing between tags and other objects. The hash is on the last
line of the output in both cases though so just grab that.

Fixes: 9cbae2aa64eb ("scripts: support any git revisions as ABI validation range")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
This commit is contained in:
Panu Matilainen 2015-12-15 15:55:15 +02:00 committed by Thomas Monjalon
parent 29c673401c
commit ece9c50d40

View File

@ -121,8 +121,8 @@ then
cleanup_and_exit 1
fi
HASH1=$(git show -s --format=%H "$TAG1" -- 2> /dev/null)
HASH2=$(git show -s --format=%H "$TAG2" -- 2> /dev/null)
HASH1=$(git show -s --format=%H "$TAG1" -- 2> /dev/null | tail -1)
HASH2=$(git show -s --format=%H "$TAG2" -- 2> /dev/null | tail -1)
# Make sure our tags exist
res=$(validate_tags)