In actually , @@ -1071,6 +1071,7 @@ static const char *find_author_by_nickname(const char *name) strbuf_release(&buf); format_commit_message(commit, "%aN <%aE>", &buf, &ctx); clear_mailmap(&mailmap); + reset_revision_walk(); return strbuf_detach(&buf, NULL); } then we can reuse this function. But I think I can give find_author_by_nickname another arg for choice if we want `reset_revision_walk()`. Thanks, Junio and Jeff.