{"thread":{"id":"45434","subject":"[PATCH] Correct compile errors when DEBUG_BISECT=1 after supporting other hash algorithms","startedAt":"2017-03-19T21:33:35Z","lastAt":"2017-03-29T21:37:51Z","messageCount":6,"participants":["Alex Hoffman","Stefan Beller","brian m. carlson","Stephan Beyer"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"314611","messageId":"CAMX8fZU-HeKzd8VYh8R=U8f8V-px+4V==M3CJSS677K0ErwPtA@mail.gmail.com","threadId":"45434","inReplyTo":null,"subject":"[PATCH] Correct compile errors when DEBUG_BISECT=1 after supporting other hash algorithms","fromName":"Alex Hoffman","fromEmail":"spec@gal.ro","sentAt":"2017-03-19T21:33:27Z","receivedAt":"2017-03-19T21:33:35Z","isPatch":true,"sender":{"key":"spec@gal.ro","avatar":null},"body":"---\n bisect.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/bisect.c b/bisect.c\nindex 30808cadf..6feed8533 100644\n--- a/bisect.c\n+++ b/bisect.c\n@@ -131,7 +131,7 @@ static void show_list(const char *debug, int\ncounted, int nr,\n                unsigned flags = commit->object.flags;\n                enum object_type type;\n                unsigned long size;\n-               char *buf = read_sha1_file(commit->object.sha1, &type, &size);\n+               char *buf = read_sha1_file(commit->object.oid.hash,\n&type, &size);\n                const char *subject_start;\n                int subject_len;\n\n@@ -143,10 +143,10 @@ static void show_list(const char *debug, int\ncounted, int nr,\n                        fprintf(stderr, \"%3d\", weight(p));\n                else\n                        fprintf(stderr, \"---\");\n-               fprintf(stderr, \" %.*s\", 8, sha1_to_hex(commit->object.sha1));\n+               fprintf(stderr, \" %.*s\", 8,\nsha1_to_hex(commit->object.oid.hash));\n                for (pp = commit->parents; pp; pp = pp->next)\n                        fprintf(stderr, \" %.*s\", 8,\n-                               sha1_to_hex(pp->item->object.sha1));\n+                               sha1_to_hex(pp->item->object.oid.hash));\n\n                subject_len = find_commit_subject(buf, &subject_start);\n                if (subject_len)\n-- \n2.12.0.399.g9d77b0405.dirty\n"},{"id":"314696","messageId":"CAGZ79kY1g-4c+GXZy3p-q=MsBY94esxsfs2=OPuhOH_o5oGc_Q@mail.gmail.com","threadId":"45434","inReplyTo":"CAMX8fZU-HeKzd8VYh8R=U8f8V-px+4V==M3CJSS677K0ErwPtA@mail.gmail.com","subject":"Re: [PATCH] Correct compile errors when DEBUG_BISECT=1 after supporting other hash algorithms","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-03-20T18:11:17Z","receivedAt":"2017-03-20T18:11:32Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"+cc Brian\n\nOn Sun, Mar 19, 2017 at 2:33 PM, Alex Hoffman <spec@gal.ro> wrote:\n> ---\n>  bisect.c | 6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/bisect.c b/bisect.c\n> index 30808cadf..6feed8533 100644\n> --- a/bisect.c\n> +++ b/bisect.c\n> @@ -131,7 +131,7 @@ static void show_list(const char *debug, int\n> counted, int nr,\n>                 unsigned flags = commit->object.flags;\n>                 enum object_type type;\n>                 unsigned long size;\n> -               char *buf = read_sha1_file(commit->object.sha1, &type, &size);\n> +               char *buf = read_sha1_file(commit->object.oid.hash,\n> &type, &size);\n>                 const char *subject_start;\n>                 int subject_len;\n>\n> @@ -143,10 +143,10 @@ static void show_list(const char *debug, int\n> counted, int nr,\n>                         fprintf(stderr, \"%3d\", weight(p));\n>                 else\n>                         fprintf(stderr, \"---\");\n> -               fprintf(stderr, \" %.*s\", 8, sha1_to_hex(commit->object.sha1));\n> +               fprintf(stderr, \" %.*s\", 8,\n> sha1_to_hex(commit->object.oid.hash));\n>                 for (pp = commit->parents; pp; pp = pp->next)\n>                         fprintf(stderr, \" %.*s\", 8,\n> -                               sha1_to_hex(pp->item->object.sha1));\n> +                               sha1_to_hex(pp->item->object.oid.hash));\n>\n>                 subject_len = find_commit_subject(buf, &subject_start);\n>                 if (subject_len)\n> --\n> 2.12.0.399.g9d77b0405.dirty\n"},{"id":"314736","messageId":"20170320221429.qefqowtwe2ptvgdg@genre.crustytoothpaste.net","threadId":"45434","inReplyTo":"CAGZ79kY1g-4c+GXZy3p-q=MsBY94esxsfs2=OPuhOH_o5oGc_Q@mail.gmail.com","subject":"Re: [PATCH] Correct compile errors when DEBUG_BISECT=1 after supporting other hash algorithms","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2017-03-20T22:14:29Z","receivedAt":"2017-03-20T22:14:41Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Mon, Mar 20, 2017 at 11:11:17AM -0700, Stefan Beller wrote:\n> +cc Brian\n> \n> On Sun, Mar 19, 2017 at 2:33 PM, Alex Hoffman <spec@gal.ro> wrote:\n> > ---\n> >  bisect.c | 6 +++---\n> >  1 file changed, 3 insertions(+), 3 deletions(-)\n> >\n> > diff --git a/bisect.c b/bisect.c\n> > index 30808cadf..6feed8533 100644\n> > --- a/bisect.c\n> > +++ b/bisect.c\n> > @@ -131,7 +131,7 @@ static void show_list(const char *debug, int\n> > counted, int nr,\n> >                 unsigned flags = commit->object.flags;\n> >                 enum object_type type;\n> >                 unsigned long size;\n> > -               char *buf = read_sha1_file(commit->object.sha1, &type, &size);\n> > +               char *buf = read_sha1_file(commit->object.oid.hash,\n> > &type, &size);\n> >                 const char *subject_start;\n> >                 int subject_len;\n> >\n> > @@ -143,10 +143,10 @@ static void show_list(const char *debug, int\n> > counted, int nr,\n> >                         fprintf(stderr, \"%3d\", weight(p));\n> >                 else\n> >                         fprintf(stderr, \"---\");\n> > -               fprintf(stderr, \" %.*s\", 8, sha1_to_hex(commit->object.sha1));\n> > +               fprintf(stderr, \" %.*s\", 8,\n> > sha1_to_hex(commit->object.oid.hash));\n\nI think here we want to write\n\nfprintf(stderr, \" %.*s\", 8, oid_to_hex(&commit->object.oid));\n\n> >                 for (pp = commit->parents; pp; pp = pp->next)\n> >                         fprintf(stderr, \" %.*s\", 8,\n> > -                               sha1_to_hex(pp->item->object.sha1));\n> > +                               sha1_to_hex(pp->item->object.oid.hash));\n\nAnd here, as well.\n\n> >\n> >                 subject_len = find_commit_subject(buf, &subject_start);\n> >                 if (subject_len)\n\nOtherwise, I think this looks good.\n\nI'm sorry I didn't catch this earlier, but I didn't even realize we had\nthis option, or I would have tested it.\n-- \nbrian m. carlson / brian with sandals: Houston, Texas, US\n+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"314868","messageId":"CAMX8fZXqTfKQXxV_pZEieN=1ap8ocVnnwZUvpGuw5rWo5_Yhfg@mail.gmail.com","threadId":"45434","inReplyTo":"20170320221429.qefqowtwe2ptvgdg@genre.crustytoothpaste.net","subject":"Re: [PATCH] Correct compile errors when DEBUG_BISECT=1 after supporting other hash algorithms","fromName":"Alex Hoffman","fromEmail":"spec@gal.ro","sentAt":"2017-03-21T21:24:05Z","receivedAt":"2017-03-21T21:24:27Z","isPatch":true,"sender":{"key":"spec@gal.ro","avatar":null},"body":"Hi, Brian,\n\nWe definitely prefer the wrapper function oid_to_hex() to\nsha1_to_hex(). Thanks for feedback.\nBelow is the updated patch:\n\n---\n bisect.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/bisect.c b/bisect.c\nindex 30808cadf..7b65acbcd 100644\n--- a/bisect.c\n+++ b/bisect.c\n@@ -131,7 +131,7 @@ static void show_list(const char *debug, int\ncounted, int nr,\n                unsigned flags = commit->object.flags;\n                enum object_type type;\n                unsigned long size;\n-               char *buf = read_sha1_file(commit->object.sha1, &type, &size);\n+               char *buf = read_sha1_file(commit->object.oid.hash,\n&type, &size);\n                const char *subject_start;\n                int subject_len;\n\n@@ -143,10 +143,10 @@ static void show_list(const char *debug, int\ncounted, int nr,\n                        fprintf(stderr, \"%3d\", weight(p));\n                else\n                        fprintf(stderr, \"---\");\n-               fprintf(stderr, \" %.*s\", 8, sha1_to_hex(commit->object.sha1));\n+               fprintf(stderr, \" %.*s\", 8, oid_to_hex(&commit->object.oid));\n                for (pp = commit->parents; pp; pp = pp->next)\n                        fprintf(stderr, \" %.*s\", 8,\n-                               sha1_to_hex(pp->item->object.sha1));\n+                                       oid_to_hex(&pp->item->object.oid));\n\n                subject_len = find_commit_subject(buf, &subject_start);\n                if (subject_len)\n-- \n2.12.0.400.g54ad2d445.dirty\n"},{"id":"315703","messageId":"CAMX8fZXS4k5chezESM4pcaSfhG6WZ4xKxsWB0fpm4h-PQGjXwQ@mail.gmail.com","threadId":"45434","inReplyTo":"CAMX8fZXqTfKQXxV_pZEieN=1ap8ocVnnwZUvpGuw5rWo5_Yhfg@mail.gmail.com","subject":"Re: [PATCH] Correct compile errors when DEBUG_BISECT=1 after supporting other hash algorithms","fromName":"Alex Hoffman","fromEmail":"spec@gal.ro","sentAt":"2017-03-29T20:02:47Z","receivedAt":"2017-03-29T20:04:48Z","isPatch":true,"sender":{"key":"spec@gal.ro","avatar":null},"body":"Any news about this patch?\n\n2017-03-21 22:24 GMT+01:00 Alex Hoffman <spec@gal.ro>:\n> Hi, Brian,\n>\n> We definitely prefer the wrapper function oid_to_hex() to\n> sha1_to_hex(). Thanks for feedback.\n> Below is the updated patch:\n>\n> ---\n>  bisect.c | 6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/bisect.c b/bisect.c\n> index 30808cadf..7b65acbcd 100644\n> --- a/bisect.c\n> +++ b/bisect.c\n> @@ -131,7 +131,7 @@ static void show_list(const char *debug, int\n> counted, int nr,\n>                 unsigned flags = commit->object.flags;\n>                 enum object_type type;\n>                 unsigned long size;\n> -               char *buf = read_sha1_file(commit->object.sha1, &type, &size);\n> +               char *buf = read_sha1_file(commit->object.oid.hash,\n> &type, &size);\n>                 const char *subject_start;\n>                 int subject_len;\n>\n> @@ -143,10 +143,10 @@ static void show_list(const char *debug, int\n> counted, int nr,\n>                         fprintf(stderr, \"%3d\", weight(p));\n>                 else\n>                         fprintf(stderr, \"---\");\n> -               fprintf(stderr, \" %.*s\", 8, sha1_to_hex(commit->object.sha1));\n> +               fprintf(stderr, \" %.*s\", 8, oid_to_hex(&commit->object.oid));\n>                 for (pp = commit->parents; pp; pp = pp->next)\n>                         fprintf(stderr, \" %.*s\", 8,\n> -                               sha1_to_hex(pp->item->object.sha1));\n> +                                       oid_to_hex(&pp->item->object.oid));\n>\n>                 subject_len = find_commit_subject(buf, &subject_start);\n>                 if (subject_len)\n> --\n> 2.12.0.400.g54ad2d445.dirty\n"},{"id":"315708","messageId":"52ac188d-1112-758e-5d02-470afc6ffa8d@gmx.net","threadId":"45434","inReplyTo":"CAMX8fZXS4k5chezESM4pcaSfhG6WZ4xKxsWB0fpm4h-PQGjXwQ@mail.gmail.com","subject":"Re: [PATCH] Correct compile errors when DEBUG_BISECT=1 after supporting other hash algorithms","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2017-03-29T21:36:08Z","receivedAt":"2017-03-29T21:37:51Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hi,\n\nOn 03/29/2017 10:02 PM, Alex Hoffman wrote:\n> Any news about this patch?\n\nHaha nice, your initial patch is the same as mine (but mine was part of\na bigger patch series and the v3 is probably going to have one less commit):\nhttps://public-inbox.org/git/1456452282-10325-4-git-send-email-s-beyer@gmx.net/\n\n>>                 for (pp = commit->parents; pp; pp = pp->next)\n>>                         fprintf(stderr, \" %.*s\", 8,\n>> -                               sha1_to_hex(pp->item->object.sha1));\n>> +                                       oid_to_hex(&pp->item->object.oid));\n\nI guess your change in continued indentation is intentional, but is it\njust my mail client or do you f*ck up tabs? (I haven't tried to apply\nthe patch but it looks like it is not possible due to broken tabs.)\n\nStephan\n"}]}