git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 11, 2015, 14:57 UTC
Message-ID
<xmqqa8w6gumu.fsf@gitster.dls.corp.google.com>
In-Reply-To
<vpqk2vaoa2t.fsf@anie.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 32 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> 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".

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.
Previous: Matthieu MoyNext: Matthieu Moy
Message 7 of 23 in “bisect: change read_bisect_terms parameters”
  1. 5/7 bisect: change read_bisect_terms parametersAntoine Delaite, Jun 10, 2015
  2. 6/7 revision: fix rev-list --bisect in old/new modeAntoine Delaite, Jun 10, 2015
  3. 7/7 bisect: allows any terms set by userAntoine Delaite, Jun 10, 2015
  4. Junio C HamanoJun 10, 2015
  5. Junio C HamanoJun 10, 2015
  6. Matthieu MoyJun 11, 2015
  7. Junio C HamanoJun 11, 2015
  8. Matthieu MoyJun 11, 2015
  9. Junio C HamanoJun 11, 2015
  10. Matthieu MoyJun 11, 2015
  11. Louis-Alexandre StuberJun 14, 2015
  12. 7/7 bisect: allows any terms set by userAntoine Delaite, Jun 14, 2015
  13. Matthieu MoyJun 15, 2015
  14. Junio C HamanoJun 15, 2015
  15. 7/7 bisect: allows any terms set by userAntoine Delaite, Jun 16, 2015
  16. Matthieu MoyJun 17, 2015
  17. 7/7 bisect: allows any terms set by userAntoine Delaite, Jun 17, 2015
  18. Matthieu MoyJun 17, 2015
  19. 7/7 bisect: allows any terms set by userAntoine Delaite, Jun 14, 2015
  20. 7/7 bisect: allows any terms set by userAntoine Delaite, Jun 14, 2015
  21. Matthieu MoyJun 15, 2015
  22. Matthieu MoyJun 15, 2015
  23. 7/7 bisect: allows any terms set by userAntoine Delaite, Jun 16, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.