Closed
Description
Like the title says. I'd like to check if a specific commit exists.
Trying to run iter_commits
over a rev that doesn't exists throws an exception, and I'd like to avoid that in order to provide nicer user output for my script.
Pseudocode:
if repo.exists(source):
return list(repo.iter_commits("%s...%s" % (source, target)))
else:
print("Couldn't find %s, you need to run git fetch")