{"thread":{"id":"11962","subject":"[Janitors] value could be NULL in config parser","startedAt":"2008-02-08T06:43:23Z","lastAt":"2008-02-09T20:11:23Z","messageCount":15,"participants":["Junio C Hamano","Miklos Vajna","Michele Ballabio","Govind Salinas","Christian Couder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"67901","messageId":"7v63x0lzhw.fsf@gitster.siamese.dyndns.org","threadId":"11962","inReplyTo":null,"subject":"[Janitors] value could be NULL in config parser","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-08T06:43:23Z","receivedAt":"2008-02-08T06:43:23Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"If somebody wants to dip his or her toe in git hacking, and is\ntempted to send in a \"clean up\" patch (e.g. whitespace, coding\nstyle) that does not really _fix_ anything, please don't.\n\nI have a task of similar complexity (meaning, reasonably easy)\nthat is much more useful and appreciated than clean-up patches\nfor you.\n\nThe callback functions that are passed to git_config() need to\nbe audited so that they do not barf when given NULL.  Currently,\nmany of them are not safe.\n\nA callback function of git_config() is called when the command\nreads value from .git/config and friends.  The function takes\ntwo parameters, var and value.  var is never NULL and it is the\nname of the configuration variable found in the file being\nread.  value could be either string or NULL.\n\nA NULL value is boolean \"true\".  For example, on MS-DOS, you may\nhave something like this:\n\n\t[core]\n \t\tautocrlf\n\nand your callback will be called with var = \"core.autocrlf\" and\nvalue = NULL in such a case.\n\nIf you want to fix them (you do not have to do all of them, and\nif you would like to help, please make one patch per function\nfixed), the procedure is:\n\n (1) Find calling sites for git_config().  For example, we find\n     one in archive-tar.c::write_tar_archive().\n\n        int write_tar_archive(struct archiver_args *args)\n        {\n                int plen = args->base ? strlen(args->base) : 0;\n\n                git_config(git_tar_config);\n\n                archive_time = args->time;\n                verbose = args->verbose;\n\t...\n\n (2) Look at the function that is passed to git_config().\n\n        static int git_tar_config(const char *var, const char *value)\n        {\n                if (!strcmp(var, \"tar.umask\")) {\n                        if (!strcmp(value, \"user\")) {\n                                tar_umask = umask(0);\n                                umask(tar_umask);\n                        } else {\n                                tar_umask = git_config_int(var, value);\n                        }\n                        return 0;\n                }\n                return git_default_config(var, value);\n        }\n\n (3) Let's fix it.  If the user's configuration has:\n\n\t[tar]\n        \tumask\n\n     it is an illegal configuration, but the code above does not\n     check for NULL, and the second strcmp() would fail.  If we\n     guard that strcmp() with a check against NULL, we would be\n     Ok.  git_config_int() will correctly barf telling the user\n     that \"tar.umask\" configuration is wrong.\n\n (4) Then send in a patch.  Again, one patch per fixed function,\n     please.  The message may look like this:\n\n-- >8 --\n[PATCH] archive-tar.c: guard config parser from value=NULL\n\nSigned-off-by: A U Thor <author@example.com>\n\n archive-tar.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/archive-tar.c b/archive-tar.c\nindex e1bced5..30aa2e2 100644\n--- a/archive-tar.c\n+++ b/archive-tar.c\n@@ -222,7 +222,7 @@ static void write_global_extended_header(const unsigned char *sha1)\n static int git_tar_config(const char *var, const char *value)\n {\n \tif (!strcmp(var, \"tar.umask\")) {\n-\t\tif (!strcmp(value, \"user\")) {\n+\t\tif (value && !strcmp(value, \"user\")) {\n \t\t\ttar_umask = umask(0);\n \t\t\tumask(tar_umask);\n \t\t} else {\n"},{"id":"67949","messageId":"20080208142602.GV25954@genesis.frugalware.org","threadId":"11962","inReplyTo":"7v63x0lzhw.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] archive-tar.c: guard config parser from value=NULL","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-02-08T14:26:02Z","receivedAt":"2008-02-08T14:26:02Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>\n---\n archive-tar.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/archive-tar.c b/archive-tar.c\nindex e1bced5..30aa2e2 100644\n--- a/archive-tar.c\n+++ b/archive-tar.c\n@@ -222,7 +222,7 @@ static void write_global_extended_header(const unsigned char *sha1)\n static int git_tar_config(const char *var, const char *value)\n {\n \tif (!strcmp(var, \"tar.umask\")) {\n-\t\tif (!strcmp(value, \"user\")) {\n+\t\tif (value && !strcmp(value, \"user\")) {\n \t\t\ttar_umask = umask(0);\n \t\t\tumask(tar_umask);\n \t\t} else {\n-- \n1.5.4\n"},{"id":"67950","messageId":"20080208142618.GW25954@genesis.frugalware.org","threadId":"11962","inReplyTo":"7v63x0lzhw.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] builtin-gc.c: guard config parser from value=NULL","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-02-08T14:26:18Z","receivedAt":"2008-02-08T14:26:18Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>\n---\n builtin-gc.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-gc.c b/builtin-gc.c\nindex ac34788..ad4a75e 100644\n--- a/builtin-gc.c\n+++ b/builtin-gc.c\n@@ -37,7 +37,7 @@ static const char *argv_rerere[] = {\"rerere\", \"gc\", NULL};\n static int gc_config(const char *var, const char *value)\n {\n \tif (!strcmp(var, \"gc.packrefs\")) {\n-\t\tif (!strcmp(value, \"notbare\"))\n+\t\tif (value && !strcmp(value, \"notbare\"))\n \t\t\tpack_refs = -1;\n \t\telse\n \t\t\tpack_refs = git_config_bool(var, value);\n-- \n1.5.4\n"},{"id":"67951","messageId":"20080208142640.GX25954@genesis.frugalware.org","threadId":"11962","inReplyTo":"7v63x0lzhw.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] remote.c: guard config parser from value=NULL","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-02-08T14:26:40Z","receivedAt":"2008-02-08T14:26:40Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>\n---\n remote.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/remote.c b/remote.c\nindex 0e00680..4765815 100644\n--- a/remote.c\n+++ b/remote.c\n@@ -276,7 +276,7 @@ static int handle_config(const char *key, const char *value)\n \t\telse\n \t\t\terror(\"more than one uploadpack given, using the first\");\n \t} else if (!strcmp(subkey, \".tagopt\")) {\n-\t\tif (!strcmp(value, \"--no-tags\"))\n+\t\tif (value && !strcmp(value, \"--no-tags\"))\n \t\t\tremote->fetch_tags = -1;\n \t} else if (!strcmp(subkey, \".proxy\")) {\n \t\tremote->http_proxy = xstrdup(value);\n-- \n1.5.4\n"},{"id":"67952","messageId":"20080208142702.GY25954@genesis.frugalware.org","threadId":"11962","inReplyTo":"7v63x0lzhw.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] setup.c: guard config parser from value=NULL","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-02-08T14:27:02Z","receivedAt":"2008-02-08T14:27:02Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>\n---\n setup.c |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/setup.c b/setup.c\nindex adede16..361825f 100644\n--- a/setup.c\n+++ b/setup.c\n@@ -346,13 +346,13 @@ int git_config_perm(const char *var, const char *value)\n {\n \tif (value) {\n \t\tint i;\n-\t\tif (!strcmp(value, \"umask\"))\n+\t\tif (value && !strcmp(value, \"umask\"))\n \t\t\treturn PERM_UMASK;\n-\t\tif (!strcmp(value, \"group\"))\n+\t\tif (value && !strcmp(value, \"group\"))\n \t\t\treturn PERM_GROUP;\n-\t\tif (!strcmp(value, \"all\") ||\n+\t\tif (value && (!strcmp(value, \"all\") ||\n \t\t    !strcmp(value, \"world\") ||\n-\t\t    !strcmp(value, \"everybody\"))\n+\t\t    !strcmp(value, \"everybody\")))\n \t\t\treturn PERM_EVERYBODY;\n \t\ti = atoi(value);\n \t\tif (i > 1)\n-- \n1.5.4\n"},{"id":"67964","messageId":"200802081734.24967.barra_cuda@katamail.com","threadId":"11962","inReplyTo":"20080208142702.GY25954@genesis.frugalware.org","subject":"Re: [PATCH] setup.c: guard config parser from value=NULL","fromName":"Michele Ballabio","fromEmail":"barra_cuda@katamail.com","sentAt":"2008-02-08T16:34:24Z","receivedAt":"2008-02-08T16:34:24Z","isPatch":true,"sender":{"key":"barra_cuda@katamail.com","avatar":"https://avatars.githubusercontent.com/u/16371673?v=4"},"body":"On Friday 08 February 2008, Miklos Vajna wrote:\n> diff --git a/setup.c b/setup.c\n> index adede16..361825f 100644\n> --- a/setup.c\n> +++ b/setup.c\n> @@ -346,13 +346,13 @@ int git_config_perm(const char *var, const char *value)\n>  {\n>  \tif (value) {\n            ^^^^^\nvalue is already checked here. No need to check further.\n\n>  \t\tint i;\n> -\t\tif (!strcmp(value, \"umask\"))\n> +\t\tif (value && !strcmp(value, \"umask\"))\n>  \t\t\treturn PERM_UMASK;\n> -\t\tif (!strcmp(value, \"group\"))\n> +\t\tif (value && !strcmp(value, \"group\"))\n>  \t\t\treturn PERM_GROUP;\n> -\t\tif (!strcmp(value, \"all\") ||\n> +\t\tif (value && (!strcmp(value, \"all\") ||\n>  \t\t    !strcmp(value, \"world\") ||\n> -\t\t    !strcmp(value, \"everybody\"))\n> +\t\t    !strcmp(value, \"everybody\")))\n>  \t\t\treturn PERM_EVERYBODY;\n>  \t\ti = atoi(value);\n>  \t\tif (i > 1)\n"},{"id":"67963","messageId":"200802081734.37715.barra_cuda@katamail.com","threadId":"11962","inReplyTo":"20080208142640.GX25954@genesis.frugalware.org","subject":"Re: [PATCH] remote.c: guard config parser from value=NULL","fromName":"Michele Ballabio","fromEmail":"barra_cuda@katamail.com","sentAt":"2008-02-08T16:34:37Z","receivedAt":"2008-02-08T16:34:37Z","isPatch":true,"sender":{"key":"barra_cuda@katamail.com","avatar":"https://avatars.githubusercontent.com/u/16371673?v=4"},"body":"On Friday 08 February 2008, Miklos Vajna wrote:\n> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>\n> ---\n>  remote.c |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/remote.c b/remote.c\n> index 0e00680..4765815 100644\n> --- a/remote.c\n> +++ b/remote.c\n> @@ -276,7 +276,7 @@ static int handle_config(const char *key, const char *value)\n>  \t\telse\n>  \t\t\terror(\"more than one uploadpack given, using the first\");\n>  \t} else if (!strcmp(subkey, \".tagopt\")) {\n> -\t\tif (!strcmp(value, \"--no-tags\"))\n> +\t\tif (value && !strcmp(value, \"--no-tags\"))\n>  \t\t\tremote->fetch_tags = -1;\n>  \t} else if (!strcmp(subkey, \".proxy\")) {\n>  \t\tremote->http_proxy = xstrdup(value);\n\nFunction handle_config() has already returned 0 at this point.\n"},{"id":"67970","messageId":"5d46db230802080907i2a13c4fep6d4c0af436fd9704@mail.gmail.com","threadId":"11962","inReplyTo":"7v63x0lzhw.fsf@gitster.siamese.dyndns.org","subject":"Re: [Janitors] value could be NULL in config parser","fromName":"Govind Salinas","fromEmail":"blix@sophiasuchtig.com","sentAt":"2008-02-08T17:07:42Z","receivedAt":"2008-02-08T17:07:42Z","isPatch":false,"sender":{"key":"blix@sophiasuchtig.com","avatar":null},"body":"On 2/8/08, Junio C Hamano <gitster@pobox.com> wrote:\n> If somebody wants to dip his or her toe in git hacking, and is\n> tempted to send in a \"clean up\" patch (e.g. whitespace, coding\n> style) that does not really _fix_ anything, please don't.\n>\n> I have a task of similar complexity (meaning, reasonably easy)\n> that is much more useful and appreciated than clean-up patches\n> for you.\n>\n> The callback functions that are passed to git_config() need to\n> be audited so that they do not barf when given NULL.  Currently,\n> many of them are not safe.\n>\n> A callback function of git_config() is called when the command\n> reads value from .git/config and friends.  The function takes\n> two parameters, var and value.  var is never NULL and it is the\n> name of the configuration variable found in the file being\n> read.  value could be either string or NULL.\n>\n> A NULL value is boolean \"true\".  For example, on MS-DOS, you may\n> have something like this:\n>\n>         [core]\n>                 autocrlf\n>\n> and your callback will be called with var = \"core.autocrlf\" and\n> value = NULL in such a case.\n>\n> If you want to fix them (you do not have to do all of them, and\n> if you would like to help, please make one patch per function\n> fixed), the procedure is:\n>\n>  (1) Find calling sites for git_config().  For example, we find\n>      one in archive-tar.c::write_tar_archive().\n>\n>         int write_tar_archive(struct archiver_args *args)\n>         {\n>                 int plen = args->base ? strlen(args->base) : 0;\n>\n>                 git_config(git_tar_config);\n>\n>                 archive_time = args->time;\n>                 verbose = args->verbose;\n>         ...\n>\n>  (2) Look at the function that is passed to git_config().\n>\n>         static int git_tar_config(const char *var, const char *value)\n>         {\n>                 if (!strcmp(var, \"tar.umask\")) {\n>                         if (!strcmp(value, \"user\")) {\n>                                 tar_umask = umask(0);\n>                                 umask(tar_umask);\n>                         } else {\n>                                 tar_umask = git_config_int(var, value);\n>                         }\n>                         return 0;\n>                 }\n>                 return git_default_config(var, value);\n>         }\n>\n>  (3) Let's fix it.  If the user's configuration has:\n>\n>         [tar]\n>                 umask\n>\n>      it is an illegal configuration, but the code above does not\n>      check for NULL, and the second strcmp() would fail.  If we\n>      guard that strcmp() with a check against NULL, we would be\n>      Ok.  git_config_int() will correctly barf telling the user\n>      that \"tar.umask\" configuration is wrong.\n>\n>  (4) Then send in a patch.  Again, one patch per fixed function,\n>      please.  The message may look like this:\n>\n> -- >8 --\n> [PATCH] archive-tar.c: guard config parser from value=NULL\n>\n> Signed-off-by: A U Thor <author@example.com>\n>\n>  archive-tar.c |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n>\n> diff --git a/archive-tar.c b/archive-tar.c\n> index e1bced5..30aa2e2 100644\n> --- a/archive-tar.c\n> +++ b/archive-tar.c\n> @@ -222,7 +222,7 @@ static void write_global_extended_header(const unsigned char *sha1)\n>  static int git_tar_config(const char *var, const char *value)\n>  {\n>         if (!strcmp(var, \"tar.umask\")) {\n> -               if (!strcmp(value, \"user\")) {\n> +               if (value && !strcmp(value, \"user\")) {\n>                         tar_umask = umask(0);\n>                         umask(tar_umask);\n>                 } else {\n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n\nI can try my hand at that.  I will send some patches later today (after work).\n\n-Govind\n"},{"id":"68007","messageId":"20080208212947.GA25954@genesis.frugalware.org","threadId":"11962","inReplyTo":"200802081734.24967.barra_cuda@katamail.com","subject":"Re: [PATCH] setup.c: guard config parser from value=NULL","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-02-08T21:29:47Z","receivedAt":"2008-02-08T21:29:47Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Fri, Feb 08, 2008 at 05:34:24PM +0100, Michele Ballabio <barra_cuda@katamail.com> wrote:\n> On Friday 08 February 2008, Miklos Vajna wrote:\n> > diff --git a/setup.c b/setup.c\n> > index adede16..361825f 100644\n> > --- a/setup.c\n> > +++ b/setup.c\n> > @@ -346,13 +346,13 @@ int git_config_perm(const char *var, const char *value)\n> >  {\n> >  \tif (value) {\n>             ^^^^^\n> value is already checked here. No need to check further.\n\nah, i missed it. should we add some comment about this or just it wasn't\nobvious to me only? (same true to the other patch where you pointed out\nthe check was not necessary)\n\nthanks,\n- VMiklos\n"},{"id":"68038","messageId":"5d46db230802081720x122a807do6c63b6b3e435b4c5@mail.gmail.com","threadId":"11962","inReplyTo":"7v63x0lzhw.fsf@gitster.siamese.dyndns.org","subject":"Re: [Janitors] value could be NULL in config parser","fromName":"Govind Salinas","fromEmail":"govind@sophiasuchtig.com","sentAt":"2008-02-09T01:20:34Z","receivedAt":"2008-02-09T01:20:34Z","isPatch":false,"sender":{"key":"govind@sophiasuchtig.com","avatar":null},"body":"On 2/8/08, Junio C Hamano <gitster@pobox.com> wrote:\n> A callback function of git_config() is called when the command\n> reads value from .git/config and friends.  The function takes\n> two parameters, var and value.  var is never NULL and it is the\n> name of the configuration variable found in the file being\n> read.  value could be either string or NULL.\n>\n> A NULL value is boolean \"true\".  For example, on MS-DOS, you may\n> have something like this:\n>\n>         [core]\n>                 autocrlf\n>\n> and your callback will be called with var = \"core.autocrlf\" and\n> value = NULL in such a case.\n>\n> If you want to fix them (you do not have to do all of them, and\n> if you would like to help, please make one patch per function\n> fixed), the procedure is:\n>\n\nI think I got all the erroneous ones.  I did\n\nfind . -name \"*.c\" | xargs grep git_config\\( | awk '{ idx = index($2,\n\")\"); p = substr($2, 12, idx - 12); print  p }' | sort | uniq -u\n\nTo try and get a list of all the ones that might need updating.  I did\nnotice that most functions never check value for null, but they don't\ndirectly access them.  They pass them off to other methods.  As far as\nI can tell, some of these methods don't validate the NULL.  So they\nwill need to be updated.\n\nQuestion.  Wouldn't it reduce the amount of validation we have to do\nif whoever is calling back checked null and assigned an empty string?\nIf so, we can probably replace all these patches with one patch.\n\n-Govind\n"},{"id":"68050","messageId":"200802090641.20171.chriscool@tuxfamily.org","threadId":"11962","inReplyTo":"5d46db230802081720x122a807do6c63b6b3e435b4c5@mail.gmail.com","subject":"Re: [Janitors] value could be NULL in config parser","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-02-09T05:41:19Z","receivedAt":"2008-02-09T05:41:19Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le samedi 9 février 2008, Govind Salinas a écrit :\n> On 2/8/08, Junio C Hamano <gitster@pobox.com> wrote:\n> > If you want to fix them (you do not have to do all of them, and\n> > if you would like to help, please make one patch per function\n> > fixed), the procedure is:\n>\n> I think I got all the erroneous ones.  I did\n>\n> find . -name \"*.c\" | xargs grep git_config\\( | awk '{ idx = index($2,\n> \")\"); p = substr($2, 12, idx - 12); print  p }' | sort | uniq -u\n>\n> To try and get a list of all the ones that might need updating. \n\nThanks.\n\n> I did \n> notice that most functions never check value for null, but they don't\n> directly access them.  They pass them off to other methods.  As far as\n> I can tell, some of these methods don't validate the NULL.  So they\n> will need to be updated.\n>\n> Question.  Wouldn't it reduce the amount of validation we have to do\n> if whoever is calling back checked null and assigned an empty string?\n> If so, we can probably replace all these patches with one patch.\n\nThis was discussed in this thread:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/72107/\n\nIn short we can't do that now, but it may be possible latter, if we first \ndeprecate using an empty string as boolean value \"false\" (while a NULL is \nboolean value \"true\").\n\nChristian.\n"},{"id":"68055","messageId":"7v63wyfyx1.fsf@gitster.siamese.dyndns.org","threadId":"11962","inReplyTo":"200802090641.20171.chriscool@tuxfamily.org","subject":"Re: [Janitors] value could be NULL in config parser","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-09T06:04:42Z","receivedAt":"2008-02-09T06:04:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <chriscool@tuxfamily.org> writes:\n\n> Le samedi 9 février 2008, Govind Salinas a écrit :\n>\n>> Question.  Wouldn't it reduce the amount of validation we have to do\n>> if whoever is calling back checked null and assigned an empty string?\n>> If so, we can probably replace all these patches with one patch.\n>\n> This was discussed in this thread:\n>\n> http://thread.gmane.org/gmane.comp.version-control.git/72107/\n>\n> In short we can't do that now, but it may be possible latter, if we first \n> deprecate using an empty string as boolean value \"false\" (while a NULL is \n> boolean value \"true\").\n\nIt may be the case that many in-tree config parser functions are\nsloppy right now.  It however is never an excuse to break user's\nexisting repositories.\n"},{"id":"68063","messageId":"200802091118.11174.chriscool@tuxfamily.org","threadId":"11962","inReplyTo":"5d46db230802081720x122a807do6c63b6b3e435b4c5@mail.gmail.com","subject":"Re: [Janitors] value could be NULL in config parser","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-02-09T10:18:10Z","receivedAt":"2008-02-09T10:18:10Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le samedi 9 février 2008, Govind Salinas a écrit :\n> I think I got all the erroneous ones.  I did\n>\n> find . -name \"*.c\" | xargs grep git_config\\( | awk '{ idx = index($2,\n> \")\"); p = substr($2, 12, idx - 12); print  p }' | sort | uniq -u\n\nIt seems the \"uniq -u\" should be only \"uniq\".\nThis way, you will also get the following ones to check:\n\ngit_default_config\ngit_diff_basic_config\ngit_log_config\ngit_pack_config\n\nThanks in advance,\nChristian.\n"},{"id":"68075","messageId":"200802091415.20295.chriscool@tuxfamily.org","threadId":"11962","inReplyTo":"200802091118.11174.chriscool@tuxfamily.org","subject":"Re: [Janitors] value could be NULL in config parser","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-02-09T13:15:20Z","receivedAt":"2008-02-09T13:15:20Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le samedi 9 février 2008, Christian Couder a écrit :\n> Le samedi 9 février 2008, Govind Salinas a écrit :\n> > I think I got all the erroneous ones.  I did\n> >\n> > find . -name \"*.c\" | xargs grep git_config\\( | awk '{ idx = index($2,\n> > \")\"); p = substr($2, 12, idx - 12); print  p }' | sort | uniq -u\n>\n> It seems the \"uniq -u\" should be only \"uniq\".\n> This way, you will also get the following ones to check:\n>\n> git_default_config\n> git_diff_basic_config\n> git_log_config\n> git_pack_config\n\nI don't know awk so I cannot tell if there is something wrong with your \nscript but with:\n\nfind . -name \"*.c\" | xargs perl -ne 'print \"$1\\n\" if (m/git_config ?\n\\(([^)]*)\\)/)' | sort | uniq\n\nI also get:\n\ngit_imap_config\nshow_all_config\n\nThanks,\nChristian.\n"},{"id":"68115","messageId":"5d46db230802091211k304197e2i2556c82494c0852f@mail.gmail.com","threadId":"11962","inReplyTo":"200802091415.20295.chriscool@tuxfamily.org","subject":"Re: [Janitors] value could be NULL in config parser","fromName":"Govind Salinas","fromEmail":"govind@sophiasuchtig.com","sentAt":"2008-02-09T20:11:23Z","receivedAt":"2008-02-09T20:11:23Z","isPatch":false,"sender":{"key":"govind@sophiasuchtig.com","avatar":null},"body":"On 2/9/08, Christian Couder <chriscool@tuxfamily.org> wrote:\n> Le samedi 9 février 2008, Christian Couder a écrit :\n> > Le samedi 9 février 2008, Govind Salinas a écrit :\n> > > I think I got all the erroneous ones.  I did\n> > >\n> > > find . -name \"*.c\" | xargs grep git_config\\( | awk '{ idx = index($2,\n> > > \")\"); p = substr($2, 12, idx - 12); print  p }' | sort | uniq -u\n> >\n> > It seems the \"uniq -u\" should be only \"uniq\".\n> > This way, you will also get the following ones to check:\n> >\n> > git_default_config\n> > git_diff_basic_config\n> > git_log_config\n> > git_pack_config\n>\n> I don't know awk so I cannot tell if there is something wrong with your\n> script but with:\n>\n> find . -name \"*.c\" | xargs perl -ne 'print \"$1\\n\" if (m/git_config ?\n> \\(([^)]*)\\)/)' | sort | uniq\n>\n> I also get:\n>\n> git_imap_config\n> show_all_config\n>\n\nIt appears only git_imap_config and git_default_config need patches.\nI will send them to the list.\n\nAre any changes to the git_config_$type functions going to be made?\nIt sounds like any change could break current configs so we are only\ngoing to stop the segfaults.\n\n-Govind\n"}]}