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

Re: [PATCH] git bisect old/new

From
Christian Couder <christian.couder@gmail.com>
Date
Jun 13, 2012, 10:12 UTC
Message-ID
<CAP8UFD1=phEzzwRBmwsLqnbM0_yAS+uMXma_uyqfdq3xo4fTGw@mail.gmail.com>
In-Reply-To
<CABURp0rWu0GtmSrLV+qEQJVYOt8p=B4bQtG3fzKh2f0fTGHwOQ@mail.gmail.com>
On Tue, Jun 12, 2012 at 9:41 PM, Phil Hord <phil.hord@gmail.com> wrote:
Show 21 quoted lines
> On Tue, Jun 12, 2012 at 1:43 AM, Junio C Hamano <gitster@pobox.com> wrote:
>>
>> >> @@ -403,9 +406,10 @@ struct commit_list *find_bisection(struct
>> >> commit_list *list,
>> >>  static int register_ref(const char *refname, const unsigned char
>> >> *sha1,
>> >>                        int flags, void *cb_data)
>> >>  {
>> >> -       if (!strcmp(refname, "bad")) {
>> >> +       if (!strcmp(refname, bisect_term_bad)) {
>> >>                current_bad_sha1 = sha1;
>> >> -       } else if (!prefixcmp(refname, "good-")) {
>> >> +       } else if (!prefixcmp(refname, "good-") ||
>> >> +                       !prefixcmp(refname, "old-")) {
>> >
>> > I don't like very much "good" and "old" to be hardcoded here.
>>
>> Really?
>
> I tend to agree.  But I like more generic code and less hard-coded in
> almost all cases.
Yeah, I prefer generic code too.
Show 23 quoted lines
>> >> @@ -731,18 +735,25 @@ static void handle_bad_merge_base(void)
>> >>        if (is_expected_rev(current_bad_sha1)) {
>> >>                char *bad_hex = sha1_to_hex(current_bad_sha1);
>> >>                char *good_hex = join_sha1_array_hex(&good_revs, ' ');
>> >> +               if (!strcmp(bisect_term_bad,"bad")) {
>> >> +                       fprintf(stderr, "The merge base %s is bad.\n"
>> >> +                               "This means the bug has been fixed "
>> >> +                               "between %s and [%s].\n",
>> >> +                               bad_hex, bad_hex, good_hex);
>> >> +               } else {
>> >> +                       fprintf(stderr, "The merge base %s is new.\n"
>> >> +                               "The property has changed "
>> >> +                               "between %s and [%s].\n",
>> >> +                               bad_hex, bad_hex, good_hex);
>> >> +               }
>> >
>> > I don't like very much "new" to be harcoded here too.
>>
>> Why not?  It is not like we will be adding any more synonym pair
>> beyond good/bad, so...
>
> Previously we discussed using yes/no, among others.
> http://permalink.gmane.org/gmane.comp.version-control.git/182496

And even if we add "yes/no" maybe people will still want to use "good/bad" instead of "bad/good", "new/old" or "yes/no".

Thanks, Christian.

Previous: Phil HordNext: Junio C Hamano
Message 5 of 14 in “git bisect old/new”
  1. git bisect old/newValentin Duperray, Jun 12, 2012
  2. Christian CouderJun 12, 2012
  3. Junio C HamanoJun 12, 2012
  4. Phil HordJun 12, 2012
  5. Christian CouderJun 13, 2012
  6. Junio C HamanoJun 13, 2012
  7. [PATCHv2] git bisect old/newValentin Duperray, Jun 12, 2012
  8. Junio C HamanoJun 12, 2012
  9. duperrav@minatec.inpg.frJun 13, 2012
  10. Christian CouderJun 14, 2012
  11. Junio C HamanoJun 14, 2012
  12. Phil HordJun 15, 2012
  13. Junio C HamanoJun 15, 2012
  14. Christian CouderJun 13, 2012

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.