{"thread":{"id":"42313","subject":"[PATCH 1/2] bisect--helper: `bisect_log` shell function in C","startedAt":"2016-05-13T20:02:16Z","lastAt":"2016-05-23T11:09:10Z","messageCount":10,"participants":["Pranit Bauva","Johannes Schindelin","Eric Sunshine","Matthieu Moy"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"286493","messageId":"1463169737-12701-1-git-send-email-pranit.bauva@gmail.com","threadId":"42313","inReplyTo":null,"subject":"[PATCH 1/2] bisect--helper: `bisect_log` shell function in C","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-05-13T20:02:16Z","receivedAt":"2016-05-13T20:02:16Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"Reimplement the `bisect_log` shell function in C and add a\n`--bisect-log` subcommand to `git bisect--helper` to call it from\ngit-bisect.sh .\n\nUsing `--bisect-log` subcommand is a temporary measure to port shell\nfunction to C so as to use the existing test suite. As more functions\nare ported, this subcommand will be retired and will be called by some\nother method.\n\nMentored-by: Lars Schneider <larsxschneider@gmail.com>\nMentored-by: Christian Couder <chriscool@tuxfamily.org>\nSigned-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n---\nThis can be applied on the pb/bisect branch\n\n builtin/bisect--helper.c | 22 +++++++++++++++++++++-\n git-bisect.sh            |  7 +------\n 2 files changed, 22 insertions(+), 7 deletions(-)\n\ndiff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c\nindex 2b21c02..87764fe 100644\n--- a/builtin/bisect--helper.c\n+++ b/builtin/bisect--helper.c\n@@ -7,6 +7,7 @@\n static const char * const git_bisect_helper_usage[] = {\n \tN_(\"git bisect--helper --next-all [--no-checkout]\"),\n \tN_(\"git bisect--helper --write-terms <bad_term> <good_term>\"),\n+\tN_(\"git bisect--helper --bisect-log\"),\n \tNULL\n };\n \n@@ -79,11 +80,26 @@ int write_terms(const char *bad, const char *good)\n \tstrbuf_release(&content);\n \treturn (res < 0) ? -1 : 0;\n }\n+\n+int bisect_log(void)\n+{\n+\tstruct strbuf buf = STRBUF_INIT;\n+\n+\tif (strbuf_read_file(&buf, \".git/BISECT_LOG\", 256) < 0)\n+\t\treturn error(_(\"We are not bisecting.\"));\n+\n+\tprintf(\"%s\", buf.buf);\n+\tstrbuf_release(&buf);\n+\n+\treturn 0;\n+}\n+\n int cmd_bisect__helper(int argc, const char **argv, const char *prefix)\n {\n \tenum {\n \t\tNEXT_ALL = 1,\n-\t\tWRITE_TERMS\n+\t\tWRITE_TERMS,\n+\t\tBISECT_LOG\n \t} cmdmode = 0;\n \tint no_checkout = 0;\n \tstruct option options[] = {\n@@ -91,6 +107,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)\n \t\t\t N_(\"perform 'git bisect next'\"), NEXT_ALL),\n \t\tOPT_CMDMODE(0, \"write-terms\", &cmdmode,\n \t\t\t N_(\"write the terms to .git/BISECT_TERMS\"), WRITE_TERMS),\n+\t\tOPT_CMDMODE(0, \"bisect-log\", &cmdmode,\n+\t\t\t N_(\"output contents of .git/BISECT_LOG\"), BISECT_LOG),\n \t\tOPT_BOOL(0, \"no-checkout\", &no_checkout,\n \t\t\t N_(\"update BISECT_HEAD instead of checking out the current commit\")),\n \t\tOPT_END()\n@@ -109,6 +127,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)\n \t\tif (argc != 2)\n \t\t\tdie(_(\"--write-terms requires two arguments\"));\n \t\treturn write_terms(argv[0], argv[1]);\n+\tcase BISECT_LOG:\n+\t\treturn bisect_log();\n \tdefault:\n \t\tdie(\"BUG: unknown subcommand '%d'\", cmdmode);\n \t}\ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex 2dd7ec5..612a9c5 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -542,11 +542,6 @@ exit code \\$res from '\\$command' is < 0 or >= 128\" >&2\n \tdone\n }\n \n-bisect_log () {\n-\ttest -s \"$GIT_DIR/BISECT_LOG\" || die \"$(gettext \"We are not bisecting.\")\"\n-\tcat \"$GIT_DIR/BISECT_LOG\"\n-}\n-\n get_terms () {\n \tif test -s \"$GIT_DIR/BISECT_TERMS\"\n \tthen\n@@ -651,7 +646,7 @@ case \"$#\" in\n \treplay)\n \t\tbisect_replay \"$@\" ;;\n \tlog)\n-\t\tbisect_log ;;\n+\t\tgit bisect--helper --bisect-log ;;\n \trun)\n \t\tbisect_run \"$@\" ;;\n \tterms)\n-- \n2.8.2\n"},{"id":"286494","messageId":"1463169737-12701-2-git-send-email-pranit.bauva@gmail.com","threadId":"42313","inReplyTo":"1463169737-12701-1-git-send-email-pranit.bauva@gmail.com","subject":"[PATCH 2/2] bisect--helper: `bisect_voc` shell function in C","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-05-13T20:02:17Z","receivedAt":"2016-05-13T20:02:17Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"Reimplement the `bisect_voc` shell function in C. This is a too small\nfunction to be called as a subcommand though the working of this\nfunction has been tested by calling it as a subcommand.\n\nMentored-by: Lars Schneider <larsxschneider@gmail.com>\nMentored-by: Pranit Bauva <pranit.bauva@gmail.com>\nSigned-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n\n---\nThe PR for testing of this function by the subcommand approach can be\nfound at:\nhttps://github.com/pranitbauva1997/git/pull/5\n\nSigned-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n---\n builtin/bisect--helper.c | 10 ++++++++++\n 1 file changed, 10 insertions(+)\n\ndiff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c\nindex 87764fe..455f1cb 100644\n--- a/builtin/bisect--helper.c\n+++ b/builtin/bisect--helper.c\n@@ -94,6 +94,16 @@ int bisect_log(void)\n \treturn 0;\n }\n \n+int bisect_voc(const char *term)\n+{\n+\tif (!strcmp(term, \"bad\"))\n+\t\tprintf(\"bad|new\\n\");\n+\tif (!strcmp(term, \"good\"))\n+\t\tprintf(\"good|old\\n\");\n+\n+\treturn 0;\n+}\n+\n int cmd_bisect__helper(int argc, const char **argv, const char *prefix)\n {\n \tenum {\n-- \n2.8.2\n"},{"id":"286495","messageId":"CAFZEwPNVmcVpzAocYF8e5+Y9J10+TSewNkWkj7yhVrJwXm=H=Q@mail.gmail.com","threadId":"42313","inReplyTo":"1463169737-12701-2-git-send-email-pranit.bauva@gmail.com","subject":"Re: [PATCH 2/2] bisect--helper: `bisect_voc` shell function in C","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-05-13T20:07:04Z","receivedAt":"2016-05-13T20:07:04Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"On Sat, May 14, 2016 at 1:32 AM, Pranit Bauva <pranit.bauva@gmail.com> wrote:\n> Reimplement the `bisect_voc` shell function in C. This is a too small\n> function to be called as a subcommand though the working of this\n> function has been tested by calling it as a subcommand.\n>\n> Mentored-by: Lars Schneider <larsxschneider@gmail.com>\n> Mentored-by: Pranit Bauva <pranit.bauva@gmail.com>\n\nI missed this. It should be\n     \"Mentored-by: Christian Couder <chriscool@tuxfamily.org>\"\n\n> Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n>\n> ---\n> The PR for testing of this function by the subcommand approach can be\n> found at:\n> https://github.com/pranitbauva1997/git/pull/5\n>\n> Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n> ---\n>  builtin/bisect--helper.c | 10 ++++++++++\n>  1 file changed, 10 insertions(+)\n>\n> diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c\n> index 87764fe..455f1cb 100644\n> --- a/builtin/bisect--helper.c\n> +++ b/builtin/bisect--helper.c\n> @@ -94,6 +94,16 @@ int bisect_log(void)\n>         return 0;\n>  }\n>\n> +int bisect_voc(const char *term)\n> +{\n> +       if (!strcmp(term, \"bad\"))\n> +               printf(\"bad|new\\n\");\n> +       if (!strcmp(term, \"good\"))\n> +               printf(\"good|old\\n\");\n> +\n> +       return 0;\n> +}\n> +\n>  int cmd_bisect__helper(int argc, const char **argv, const char *prefix)\n>  {\n>         enum {\n> --\n> 2.8.2\n>\n"},{"id":"286648","messageId":"alpine.DEB.2.20.1605160838540.3303@virtualbox","threadId":"42313","inReplyTo":"1463169737-12701-2-git-send-email-pranit.bauva@gmail.com","subject":"Re: [PATCH 2/2] bisect--helper: `bisect_voc` shell function in C","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-05-16T06:40:16Z","receivedAt":"2016-05-16T06:40:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Pranit,\n\nOn Sat, 14 May 2016, Pranit Bauva wrote:\n\n> Reimplement the `bisect_voc` shell function in C. This is a too small\n> function to be called as a subcommand though the working of this\n> function has been tested by calling it as a subcommand.\n\nThis leaves me puzzled as to what this patch is supposed to do. Maybe\nrename this function to have a more intuitive name, and then throw in a\npatch that makes use of the function?\n\nCiao,\nDscho\n"},{"id":"286651","messageId":"CAPig+cTfZ1hWXZcx5OLNRRqJ7FkTigizpMB9E1xzv1Tv+8YY2w@mail.gmail.com","threadId":"42313","inReplyTo":"1463169737-12701-1-git-send-email-pranit.bauva@gmail.com","subject":"Re: [PATCH 1/2] bisect--helper: `bisect_log` shell function in C","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2016-05-16T07:36:42Z","receivedAt":"2016-05-16T07:36:42Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, May 13, 2016 at 4:02 PM, Pranit Bauva <pranit.bauva@gmail.com> wrote:\n> bisect--helper: `bisect_log` shell function in C\n\nDo you need to insert \"rewrite\" or \"reimplement\" in the subject?\n\n> Reimplement the `bisect_log` shell function in C and add a\n> `--bisect-log` subcommand to `git bisect--helper` to call it from\n> git-bisect.sh .\n>\n> Using `--bisect-log` subcommand is a temporary measure to port shell\n> function to C so as to use the existing test suite. As more functions\n> are ported, this subcommand will be retired and will be called by some\n> other method.\n>\n> Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n> ---\n> diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c\n> @@ -79,11 +80,26 @@ int write_terms(const char *bad, const char *good)\n> +int bisect_log(void)\n\ns/^/static/\n\n> +{\n> +       struct strbuf buf = STRBUF_INIT;\n> +\n> +       if (strbuf_read_file(&buf, \".git/BISECT_LOG\", 256) < 0)\n\nAs mentioned in my review of the \"write-terms\" rewrite, hardcoding\n\".git/\" here is wrong for a variety of reasons. See get_git_dir(),\nget_git_common_dir(), etc. in cache.h instead.\n\n> +               return error(_(\"We are not bisecting.\"));\n> +\n> +       printf(\"%s\", buf.buf);\n> +       strbuf_release(&buf);\n> +\n> +       return 0;\n> +}\n> +\n>  int cmd_bisect__helper(int argc, const char **argv, const char *prefix)\n>  {\n> @@ -109,6 +127,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)\n>                 if (argc != 2)\n>                         die(_(\"--write-terms requires two arguments\"));\n>                 return write_terms(argv[0], argv[1]);\n> +       case BISECT_LOG:\n\nShouldn't you be die()ing here with an appropriate error message if\nargc is not 0?\n\n> +               return bisect_log();\n>         default:\n>                 die(\"BUG: unknown subcommand '%d'\", cmdmode);\n>         }\n"},{"id":"286652","messageId":"vpqlh3a1lyq.fsf@anie.imag.fr","threadId":"42313","inReplyTo":"1463169737-12701-2-git-send-email-pranit.bauva@gmail.com","subject":"Re: [PATCH 2/2] bisect--helper: `bisect_voc` shell function in C","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2016-05-16T07:49:33Z","receivedAt":"2016-05-16T07:49:33Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Pranit Bauva <pranit.bauva@gmail.com> writes:\n\n> +int bisect_voc(const char *term)\n> +{\n> +\tif (!strcmp(term, \"bad\"))\n> +\t\tprintf(\"bad|new\\n\");\n> +\tif (!strcmp(term, \"good\"))\n> +\t\tprintf(\"good|old\\n\");\n\nIf you meant to use this as a helper command, then the implementation is\nright, but you're not doing that.\n\nIf you write the function because one day you'll be calling it from C,\nthen:\n\n1) First, I'd wait for this \"one day\" to happen. In general, write code\n   when you need it, don't write it ahead of time. Currently, you have\n   dead and untested code (I know, *you* have tested it, but it's still\n   \"untested\" as far as git.git is concerned). Dead code may bother\n   people reading the code (one would not understand why it's there),\n   and untested code means it may break later without anyone noticing.\n\n2) Second, you'd need to return the string, not print it. You'll\n   typically use it like this:\n\n     printf(_(\"You need to give me at least one %s and one %s\"),\n            bisect_voc(BISECT_BAD), bisect_voc(BISECT_GOOD));\n\n   which gives one more argument for 1): once you have a use-case, you\n   can design the API properly, and not blindly guess that you're going\n   to need printf. Actually, writting these 2 example lines, I also\n   noticed that the parameters could/should be an enum type rather than\n   a string, it makes the code both more efficient and clearer.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"287074","messageId":"CAFZEwPMFBmHUaX+Y8Fpd4BnJiB8N_XBOX30hRsSvb3tm8-MX5w@mail.gmail.com","threadId":"42313","inReplyTo":"alpine.DEB.2.20.1605160838540.3303@virtualbox","subject":"Re: [PATCH 2/2] bisect--helper: `bisect_voc` shell function in C","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-05-20T07:23:04Z","receivedAt":"2016-05-20T07:23:04Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"Hey Johannes,\n\nOn Mon, May 16, 2016 at 12:10 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi Pranit,\n>\n> On Sat, 14 May 2016, Pranit Bauva wrote:\n>\n>> Reimplement the `bisect_voc` shell function in C. This is a too small\n>> function to be called as a subcommand though the working of this\n>> function has been tested by calling it as a subcommand.\n>\n> This leaves me puzzled as to what this patch is supposed to do. Maybe\n> rename this function to have a more intuitive name, and then throw in a\n> patch that makes use of the function?\n\nAre you suggesting to first have an introductory patch which will\nrename the function in the shell script and then this patch which will\nconvert the \"new\" shell function to C? I can do this. I have to think\nof a nice name. How does 'good_or_bad\" sound?\n\nRegards,\nPranit Bauva\n"},{"id":"287075","messageId":"CAFZEwPO3=-vqEdxPPTA40YoVf_PtEJrfjtHskicnYzAj+Efe7w@mail.gmail.com","threadId":"42313","inReplyTo":"CAPig+cTfZ1hWXZcx5OLNRRqJ7FkTigizpMB9E1xzv1Tv+8YY2w@mail.gmail.com","subject":"Re: [PATCH 1/2] bisect--helper: `bisect_log` shell function in C","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-05-20T07:28:21Z","receivedAt":"2016-05-20T07:28:21Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"Hey Eric,\n\nOn Mon, May 16, 2016 at 1:06 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:\n> On Fri, May 13, 2016 at 4:02 PM, Pranit Bauva <pranit.bauva@gmail.com> wrote:\n>> bisect--helper: `bisect_log` shell function in C\n>\n> Do you need to insert \"rewrite\" or \"reimplement\" in the subject?\n>\n>> Reimplement the `bisect_log` shell function in C and add a\n>> `--bisect-log` subcommand to `git bisect--helper` to call it from\n>> git-bisect.sh .\n>>\n>> Using `--bisect-log` subcommand is a temporary measure to port shell\n>> function to C so as to use the existing test suite. As more functions\n>> are ported, this subcommand will be retired and will be called by some\n>> other method.\n>>\n>> Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n>> ---\n>> diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c\n>> @@ -79,11 +80,26 @@ int write_terms(const char *bad, const char *good)\n>> +int bisect_log(void)\n>\n> s/^/static/\n\nWill include this in the re-roll\n\n>> +{\n>> +       struct strbuf buf = STRBUF_INIT;\n>> +\n>> +       if (strbuf_read_file(&buf, \".git/BISECT_LOG\", 256) < 0)\n>\n> As mentioned in my review of the \"write-terms\" rewrite, hardcoding\n> \".git/\" here is wrong for a variety of reasons. See get_git_dir(),\n> get_git_common_dir(), etc. in cache.h instead.\n\nThanks. I will have a look into this.\n\n>> +               return error(_(\"We are not bisecting.\"));\n>> +\n>> +       printf(\"%s\", buf.buf);\n>> +       strbuf_release(&buf);\n>> +\n>> +       return 0;\n>> +}\n>> +\n>>  int cmd_bisect__helper(int argc, const char **argv, const char *prefix)\n>>  {\n>> @@ -109,6 +127,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)\n>>                 if (argc != 2)\n>>                         die(_(\"--write-terms requires two arguments\"));\n>>                 return write_terms(argv[0], argv[1]);\n>> +       case BISECT_LOG:\n>\n> Shouldn't you be die()ing here with an appropriate error message if\n> argc is not 0?\n\nI think it would be better to check for argc != 0 and die\nappropriately. Will include this in the re-roll.\n\n>> +               return bisect_log();\n>>         default:\n>>                 die(\"BUG: unknown subcommand '%d'\", cmdmode);\n>>         }\n\nRegards,\nPranit Bauva\n"},{"id":"287210","messageId":"CAFZEwPN0fydOiKZ4ZShivuNDpU=VAKe=wwimPSi-Yae0JA4Ukw@mail.gmail.com","threadId":"42313","inReplyTo":"CAFZEwPMFBmHUaX+Y8Fpd4BnJiB8N_XBOX30hRsSvb3tm8-MX5w@mail.gmail.com","subject":"Re: [PATCH 2/2] bisect--helper: `bisect_voc` shell function in C","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-05-22T19:49:56Z","receivedAt":"2016-05-22T19:49:56Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"Hey Matthieu,\nSorry for the late reply. Somehow your email didn't receive my\nmailbox. I got to see this mail when I was going through the gmane\narchives.\n\nMatthieu Moy <Matthieu.Moy <at> grenoble-inp.fr> writes:\n  Pranit Bauva <pranit.bauva <at> gmail.com> writes:\n\n>> +int bisect_voc(const char *term)\n>> +{\n>> + if (!strcmp(term, \"bad\"))\n>> + printf(\"bad|new\\n\");\n>> + if (!strcmp(term, \"good\"))\n>> + printf(\"good|old\\n\");\n>\n> If you meant to use this as a helper command, then the implementation is\n> right, but you're not doing that.\n\n> If you write the function because one day you'll be calling it from C,\n> then:\n\n> 1) First, I'd wait for this \"one day\" to happen. In general, write code\n>    when you need it, don't write it ahead of time. Currently, you have\n>    dead and untested code (I know, *you* have tested it, but it's still\n>    \"untested\" as far as git.git is concerned). Dead code may bother\n>    people reading the code (one would not understand why it's there),\n>    and untested code means it may break later without anyone noticing.\n>\n\nI think this function can wait then. I will include this patch when\nits really required. I wanted to convert this function ASAP because it\nwas a really tiny one and an easy one.\n\n> 2) Second, you'd need to return the string, not print it. You'll\n>    typically use it like this:\n\n>     printf(_(\"You need to give me at least one %s and one %s\"),\n>            bisect_voc(BISECT_BAD), bisect_voc(BISECT_GOOD));\n\n>   which gives one more argument for 1): once you have a use-case, you\n>   can design the API properly, and not blindly guess that you're going\n>   to need printf. Actually, writting these 2 example lines, I also\n>   noticed that the parameters could/should be an enum type rather than\n>   a string, it makes the code both more efficient and clearer.\n>\n\nOkay I get it. It would be much more efficient to return a enum\nbecause its difficult to parse text output into a C program. I hadn't\nlooked further into the function. Thanks for pointing it out early!\n\nI will wait before re-rolling this patch and will do it when I convert\nbisect_state().\n\nRegards,\nPranit Bauva\n"},{"id":"287238","messageId":"alpine.DEB.2.20.1605231308070.4122@virtualbox","threadId":"42313","inReplyTo":"CAFZEwPMFBmHUaX+Y8Fpd4BnJiB8N_XBOX30hRsSvb3tm8-MX5w@mail.gmail.com","subject":"Re: [PATCH 2/2] bisect--helper: `bisect_voc` shell function in C","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-05-23T11:09:10Z","receivedAt":"2016-05-23T11:09:10Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Pranit,\n\nOn Fri, 20 May 2016, Pranit Bauva wrote:\n\n> On Mon, May 16, 2016 at 12:10 PM, Johannes Schindelin\n> <Johannes.Schindelin@gmx.de> wrote:\n> >\n> > On Sat, 14 May 2016, Pranit Bauva wrote:\n> >\n> >> Reimplement the `bisect_voc` shell function in C. This is a too small\n> >> function to be called as a subcommand though the working of this\n> >> function has been tested by calling it as a subcommand.\n> >\n> > This leaves me puzzled as to what this patch is supposed to do. Maybe\n> > rename this function to have a more intuitive name, and then throw in a\n> > patch that makes use of the function?\n> \n> Are you suggesting to first have an introductory patch which will\n> rename the function in the shell script and then this patch which will\n> convert the \"new\" shell function to C? I can do this. I have to think\n> of a nice name. How does 'good_or_bad\" sound?\n\nFor such a short function, I would simply use a more sensible name in the\nC version of the function. In other words, I would not bother with an\nextra patch but do it all in the same patch, describing it well in the\ncommit message.\n\nCiao,\nJohannes\n"}]}