chiark / gitweb /
autopkgtests: t-has-ancestor: cope with tag args and return a commit
[dgit.git] / tests / lib
index 6f2558061d343f8545d2e459f793a9ffd47b13b5..b6bf81088114a2c8f792995b23e7b7544e3af4d3 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -50,8 +50,8 @@ t-git-none () {
 }
 
 t-has-ancestor () {
-       local ancestor=`git rev-parse $1`
        local now=`git rev-parse HEAD`
+       local ancestor=`git rev-parse $1^{}`
        local mbase=`git merge-base $ancestor $now`
        if [ x$mbase != x$ancestor ]; then
                echo "not ff $ancestor..$now, $mbase != $ancestor"