Christian Couder <christian.couder@xxxxxxxxx> writes: >> I wonder if it is just a simple matter of a few lines of code, like >> this? > > Yeah, I also think it's a good idea. > >> ---- >8 ------- >8 ------- >8 ------- >8 ------- >8 ---- >> Subject: [PATCH] bisect: do not run show-branch just to show the current commit >> >> In scripted versions of "git bisect", we used "git show-branch" to >> describe single commit in the bisect log and also to the interactive > > s/single/ a single/ Thanks. >> enum bisect_error res = BISECT_OK; >> + struct commit *commit; >> + struct pretty_print_context pp = {0}; >> + struct strbuf commit_msg = STRBUF_INIT; >> ... >> + commit = lookup_commit_reference(the_repository, bisect_rev); >> + format_commit_message(commit, "[%H] %s%n", &commit_msg, &pp); >> + fputs(commit_msg.buf, stdout); >> + strbuf_release(&commit_msg); >> + >> return -abs(res); > > Nice! Now, the above line can be simplified to: > > return BISECT_OK; > > And the declaration of the `res` variable can be moved into the else > clause where it is used. Thanks, again.