get_commit helper