Fix tools/check-signed-off.sh to handle PRs not based on HEAD

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2016-02-19 09:36:05 +01:00
parent 5afc0600b4
commit be1920dc46
-6
View File
@@ -21,14 +21,8 @@ if [ "${#parent_hashes[@]}" -eq 1 ]
then then
commit_hash=`git show -s --format=%h HEAD | head -1` commit_hash=`git show -s --format=%h HEAD | head -1`
elif [ "${#parent_hashes[@]}" -eq 2 ] elif [ "${#parent_hashes[@]}" -eq 2 ]
then
if git merge-base --is-ancestor "${parent_hashes[@]}"
then then
commit_hash=${parent_hashes[1]} commit_hash=${parent_hashes[1]}
else
echo "$0: cannot handle merge commit where first parent ${parent_hashes[0]} is not ancestor of second parent ${parent_hashes[1]}"
exit 1
fi
else else
echo "$0: cannot handle commit with ${#parent_hashes[@]} parents ${parent_hashes[@]}" echo "$0: cannot handle commit with ${#parent_hashes[@]} parents ${parent_hashes[@]}"
exit 1 exit 1