pr-git-2335/HaraldNordgren/bisect-auto-reset-v6
tagged this
02 Aug 21:24
Add a --reset-when-found option to git bisect that resets the bisect session when culprit is found. Changes in v6: * Reuse the existing bad bisect ref instead of propagating the culprit OID through bisect_next_all(). * Remove the redundant reset_when_found_arg_seen flag and use RESET_WHEN_FOUND_NONE to detect whether the option was given. Changes in v5: * Move automatic reset handling to cmd_bisect() after subcommand resources are closed. * Propagate the first-bad commit OID from bisect_next_all() and remove defer_reset plumbing. * Separate checkout from state cleanup in bisect_reset(), and use bool for its quiet flag. Changes in v4: * Simplify translation calls. * Avoid git subshell calls in tests, that can bury errors. Changes in v3: * Rename --auto-reset to --reset-when-found, including internal names. * Defer git bisect run cleanup until captured output is printed and BISECT_RUN is closed. Drop the open-descriptor preparatory change, retaining the existing filename-based output handling. Changes in v2: * Add option --auto-reset[=<where>] with option to go to final commit as well as original. * Refactored tests. Harald Nordgren (2): bisect: let bisect_reset() optionally check out quietly bisect: add --reset-when-found to leave when done Documentation/git-bisect.adoc | 14 ++- bisect.c | 2 + builtin/bisect.c | 162 +++++++++++++++++++++++++++++++--- t/t6030-bisect-porcelain.sh | 121 +++++++++++++++++++++++++ 4 files changed, 285 insertions(+), 14 deletions(-) base-commit: a97fcc37c2bc6340a8d7ce78dedf227aac4e9aa7 Submitted-As: https://lore.kernel.org/git/pull.2335.v6.git.git.1785705860.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2335.git.git.1784180159.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2335.v2.git.git.1784312854.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2335.v3.git.git.1784538619.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2335.v4.git.git.1785577445.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2335.v5.git.git.1785663075.gitgitgadget@gmail.com