]> arthur.barton.de Git - bup.git/blobdiff - t/subtree-hash
Remove all of the remaining test-related "set -e" usage.
[bup.git] / t / subtree-hash
index 45e727c8bf2f51e5835737a5d186e2fdf5e9da21..e85b37fff5ffd2382fb5ec0e9f359a5fb6dc960c 100755 (executable)
@@ -1,7 +1,5 @@
 #!/usr/bin/env bash
 
-set -eo pipefail
-
 # Usage: subtree-hash ROOT_HASH [SUBDIR ...]
 
 subtree_hash()
@@ -13,7 +11,7 @@ subtree_hash()
         subdir="$2"
         subtree_info="$(git ls-tree "$root_hash" | grep -E "   $subdir\$")" || true
         if test "$(echo "$subtree_info" | wc -l)" -ne 1; then
-            echo "Found more than one matching line in subtree $root_hash" 1>&2
+            echo "Didn't find just one matching line in subtree $root_hash" 1>&2
             return 1
         fi
 
@@ -23,8 +21,8 @@ subtree_hash()
             return 1
         fi
 
-        shift 2
-        subtree_hash "$subtree_hash" "$@"
+        shift 2 || exit $?
+        subtree_hash "$subtree_hash" "$@" || exit $?
     fi
 }