Make has_commit() non-static