Make toHash() handle passed hashes and branch names