Re: [PATCH v10 7/7] bisect: allow any terms set by user
From: Christian Couder <hidden>
Date: 2016-06-15 23:05:33
On Fri, Jun 26, 2015 at 6:58 PM, Matthieu Moy [off-list ref] wrote:
From: Antoine Delaite <redacted> Introduction of the git bisect terms command. The user can set his own terms. It will work exactly like before. The terms must be set before the start.
After looking a bit at the code, I think that for now existing
predefined terms ("bad", "good", "new" and "old") as well as some
other terms that look like bisect subcommands like "skip", "start" and
"terms" should be disallowed as arguments to "git bisect terms", and
this should be stated in the commit message and in the documentation
as well as checked and tested.
For example a user might want to search for a fix by using "git bisect
terms good bad" (which should swap "good" and "bad"), but we should
not at least for now allow that.
quoted hunk ↗ jump to hunk
@@ -185,7 +197,12 @@ bisect_start() { eval "$eval true" && if test $must_write_terms -eq 1 then - write_terms "$NAME_BAD" "$NAME_GOOD" + write_terms "$NAME_BAD" "$NAME_GOOD" && + if test $must_log_terms -eq 1 + then + echo "git bisect terms $NAME_BAD $NAME_GOOD" \ + >>"$GIT_DIR/BISECT_LOG" + fi
Maybe you could move appending to the log into write_terms() though you might need to pass an additional argument to enable or disable logging.