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 10, 2015, 21:16 UTC
Message-ID
<xmqqk2vbi7rf.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1433962918-6536-3-git-send-email-antoine.delaite@ensimag.grenoble-inp.fr>
Antoine Delaite <antoine.delaite@ensimag.grenoble-inp.fr> writes:
> -USAGE='[help|start|bad|good|new|old|skip|next|reset|visualize|replay|log|run]'
> +USAGE='[help|start|bad|good|new|old|terms|skip|next|reset|visualize|replay|log|run]'
I think this patch makes the whole series go in the right direction.

I wonder if you can skip the "we only support new/old if you are not doing bog-standard bad/good" step and start from this "bisect terms" one, though.

Then you do not even have to treat new/old any specially, and do not even have to list them in the above list.

Show 11 quoted lines
> @@ -79,9 +81,16 @@ bisect_start() {
>  	orig_args=$(git rev-parse --sq-quote "$@")
>  	bad_seen=0
>  	eval=''
> -	# start_bad_good is used to detect if we did a 
> -	# 'git bisect start bad_rev good_rev'
> -	start_bad_good=0
> +	# terms_defined is used to detect if we did a
> +	# 'git bisect start bad_rev good_rev' or if the user
> +	# defined his own terms with git bisect terms
> +	terms_defined=0

I like this change very much; it removes the mysteriously misnamed start-bad-good variable (because you do not really _care_ that 'start' was what implicitly decided that good/bad pair is the term we use in this session; what you care is that the terms are already known or not).

That is another reason why I think it would be a better organization for the patch series to do without the intermediate "we now add new/old as another hardcoded values on top of the traditional bad/good".

That is, I would think a reasonable progression of the series would look more like these three steps:

 - preliminary clean-up steps (e.g. "correct 'mistook'");
 - use $name_new and $name_old throughout the code, giving them
   'bad' and 'good' as hardcoded values; finally
 - add 'bisect terms' support.
Thanks.
Previous: Antoine DelaiteNext: Junio C Hamano
Message 4 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.