Subject: Re: [PATCH v2 7/7] bisect: allows any terms set by user

From: Junio C Hamano <[email-masked]>
Date: Thu, 11 Jun 2015 07:57:45 -0700

Matthieu Moy <[email-masked]> writes:

> Junio C Hamano <[email-masked]> writes:
>
>> Junio C Hamano <[email-masked]> 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".

Of course you are right.  The "remind me what I was doing" help
should be given when the user asks "git bisect terms" without any
parameters, not in "else die" part.

Thanks for a correction.