chiark / gitweb /
autopkgtests: t-has-ancestor: cope with tag args and return a commit
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 17 Nov 2013 19:18:36 +0000 (19:18 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 24 Nov 2013 17:45:28 +0000 (17:45 +0000)
tests/lib

index 6f25580..b6bf810 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"