Add support for finding branch according to the commit ID.