Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upHow to check if a commit exists? #721
Comments
I think the way to go is to catch the exception. |
Hi Byron, your answer is clear, thank you. However, I think it is possible to keep the issue open for future improvement: it can be a feature that other people think is worth to have.
Thank you, Byron |
If it should be a feature or change in behavior, please submit a new issue which presents the desired capabilities in a way that would allow discussion and/or contributions. Thank you |
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: