This will print out all the branches, then match on the return status (which is fine as is currently written, since `grep` exits with a non-zero status code if there are no matches).  Do we want to redirect stdout?  And perhaps we shouldn't rely upon grep being the last command there, but instead capture the output and check to see if it's empty.