Re: [PATCH v2 7/7] bisect: allows any terms set by user
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jun 11, 2015, 09:42 UTC
- Message-ID
- <vpqk2vaoa2t.fsf@anie.imag.fr>
- In-Reply-To
- <xmqq7frbi4uv.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 25 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> +bisect_terms () {
>> + test $# -eq 2 ||
>> + die "You need to give me at least two arguments"
>> +
>> + if ! test -s "$GIT_DIR/BISECT_START"
>> + then
>> + echo $1 >"$GIT_DIR/BISECT_TERMS" &&
>> + echo $2 >>"$GIT_DIR/BISECT_TERMS" &&
>> + echo "1" > "$GIT_DIR/TERMS_DEFINED"
>> + else
>> + die "A bisection has already started, please use "\
>> + "'git bisect reset' to restart and change the terms"
>> + fi
>> +}
>> +
>
> I think "git bisect terms" is a good way to help a user to recall
> what two names s/he decided to use for the current session. So
> dying 'already started' with suggestion for 'reset' is OK, but at
> the same time, helping the user to continue the current bisection by
> giving a message along the lines of "You are hunting for a commit
> that is at the boundary of the old state (you are calling it
> '$NAME_OLD') and the new state ('$NAME_NEW')" would be a good idea.I'd put a very verbose message explaining the situation and the way out (use 'git bisect') for the second "die", and I would consider "git bisect terms" without arguments as a valid command to ask "please tell me what the terms are".
-- Matthieu Moy http://www-verimag.imag.fr/~moy/