     /// Read a tree object.
     func read(tree hash: Hash) throws -> Tree {
         // Get the contents using `ls-tree`.
-        let treeInfo = try Git.runPopen([Git.tool, "-C", path.asString, "ls-tree", hash.bytes.asString!])
+        let treeInfo = try runPopen([Git.tool, "-C", path.asString, "ls-tree", hash.bytes.asString!])
 
         var contents: [Tree.Entry] = []
         for line in treeInfo.components(separatedBy: "\n") {

        } else {
            specifier = treeish
        }
        let response = try Git.runPopen([Git.tool, "-C", path.asString, "rev-parse", "--verify", specifier]).chomp()
        if let hash = Hash(response) {
            return hash
        } else {

    /// The path of the repository on disk.
    public let path: AbsolutePath

    /// The (serial) queue to execute git cli on.
    private let queue = DispatchQueue(label: "org.swift.swiftpm.gitqueue")

    public init(path: AbsolutePath) {
        self.path = path
    }

    // MARK: Repository Interface

    /// Returns the tags present in repository.
    public var tags: [String] {
        return queue.sync {
            // Check if we already have the tags cached.
            if let tags = tagsCache {
                return tags
            }
            tagsCache = getTags()
            return tagsCache!
        }
    }

    /// Cache for the tags.
    private var tagsCache: [String]? = nil

    /// Returns the tags present in repository.
    private func getTags() -> [String] {
        // FIXME: Error handling.
        let tagList = try! Git.runPopen([Git.tool, "-C", path.asString, "tag", "-l"])
