{"thread":{"id":"13182","subject":"[PATCH (try 3)] http.c: 'use_git_config_string' on configuration options.","startedAt":"2008-04-19T22:39:21Z","lastAt":"2008-04-20T16:26:08Z","messageCount":6,"participants":["Tordek","Junio C Hamano","Christian Couder","Stephan Beyer"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"74774","messageId":"480A7499.1040705@gmail.com","threadId":"13182","inReplyTo":null,"subject":"[PATCH (try 3)] http.c: 'use_git_config_string' on configuration options.","fromName":"Tordek","fromEmail":"kedrot@gmail.com","sentAt":"2008-04-19T22:39:21Z","receivedAt":"2008-04-19T22:39:21Z","isPatch":true,"sender":{"key":"kedrot@gmail.com","avatar":"https://gravatar.com/avatar/bebae16b32978df6b3e930ec82f6b7e72f5f6883cc6b26419929e0356e9f26a7?d=mp&s=160"},"body":"Signed-off-by: Guillermo O. Freschi <tordek@tordek.com.ar>\n---\nMy apologies, I had made a mistake on the previous attempt.\n\n  http.c |   36 ++++++++++++------------------------\n  1 files changed, 12 insertions(+), 24 deletions(-)\n\ndiff --git a/http.c b/http.c\nindex 256a5f1..8ae6432 100644\n--- a/http.c\n+++ b/http.c\n@@ -13,14 +13,14 @@ static CURL *curl_default;\n  char curl_errorstr[CURL_ERROR_SIZE];\n\n  static int curl_ssl_verify = -1;\n-static char *ssl_cert = NULL;\n+static const char *ssl_cert = NULL;\n  #if LIBCURL_VERSION_NUM >= 0x070902\n-static char *ssl_key = NULL;\n+static const char *ssl_key = NULL;\n  #endif\n  #if LIBCURL_VERSION_NUM >= 0x070908\n-static char *ssl_capath = NULL;\n+static const char *ssl_capath = NULL;\n  #endif\n-static char *ssl_cainfo = NULL;\n+static const char *ssl_cainfo = NULL;\n  static long curl_low_speed_limit = -1;\n  static long curl_low_speed_time = -1;\n  static int curl_ftp_no_epsv = 0;\n@@ -100,39 +100,27 @@ static int http_options(const char *var, const \nchar *value)\n  \t}\n\n  \tif (!strcmp(\"http.sslcert\", var)) {\n-\t\tif (ssl_cert == NULL) {\n-\t\t\tif (!value)\n-\t\t\t\treturn config_error_nonbool(var);\n-\t\t\tssl_cert = xstrdup(value);\n-\t\t}\n+\t\tif (ssl_cert == NULL)\n+\t\t\treturn git_config_string(&ssl_cert, var, value);\n  \t\treturn 0;\n  \t}\n  #if LIBCURL_VERSION_NUM >= 0x070902\n  \tif (!strcmp(\"http.sslkey\", var)) {\n-\t\tif (ssl_key == NULL) {\n-\t\t\tif (!value)\n-\t\t\t\treturn config_error_nonbool(var);\n-\t\t\tssl_key = xstrdup(value);\n-\t\t}\n+\t\tif (ssl_key == NULL)\n+\t\t\treturn git_config_string(&ssl_key, var, value);\n  \t\treturn 0;\n  \t}\n  #endif\n  #if LIBCURL_VERSION_NUM >= 0x070908\n  \tif (!strcmp(\"http.sslcapath\", var)) {\n-\t\tif (ssl_capath == NULL) {\n-\t\t\tif (!value)\n-\t\t\t\treturn config_error_nonbool(var);\n-\t\t\tssl_capath = xstrdup(value);\n-\t\t}\n+\t\tif (ssl_capath == NULL)\n+\t\t\treturn git_config_string(&ssl_capath, var, value);\n  \t\treturn 0;\n  \t}\n  #endif\n  \tif (!strcmp(\"http.sslcainfo\", var)) {\n-\t\tif (ssl_cainfo == NULL) {\n-\t\t\tif (!value)\n-\t\t\t\treturn config_error_nonbool(var);\n-\t\t\tssl_cainfo = xstrdup(value);\n-\t\t}\n+\t\tif (ssl_cainfo == NULL)\n+\t\t\treturn git_config_string(&ssl_cainfo, var, value);\n  \t\treturn 0;\n  \t}\n\n-- \n1.5.2.2\n"},{"id":"74793","messageId":"7vwsmtdwy4.fsf@gitster.siamese.dyndns.org","threadId":"13182","inReplyTo":"480A7499.1040705@gmail.com","subject":"Re: [PATCH (try 3)] http.c: 'use_git_config_string' on configuration options.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-04-20T03:30:59Z","receivedAt":"2008-04-20T03:30:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tordek <kedrot@gmail.com> writes:\n\n> Signed-off-by: Guillermo O. Freschi <tordek@tordek.com.ar>\n> ---\n> My apologies, I had made a mistake on the previous attempt.\n\nHeh, Christian, doesn't this patch look _suspiciously_ familiar ;-)?\n\ncf.\n\n $gmane/79392 aka Message-Id: <7vskxqe0db.fsf@gitster.siamese.dyndns.org>\n"},{"id":"74794","messageId":"20080420060629.38407fe1.chriscool@tuxfamily.org","threadId":"13182","inReplyTo":"480A7499.1040705@gmail.com","subject":"Re: [PATCH (try 3)] http.c: 'use_git_config_string' on configuration options.","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-04-20T04:06:29Z","receivedAt":"2008-04-20T04:06:29Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Sat, 19 Apr 2008 19:39:21 -0300\nTordek <kedrot@gmail.com> wrote:\n\n> Signed-off-by: Guillermo O. Freschi <tordek@tordek.com.ar>\n> ---\n> My apologies, I had made a mistake on the previous attempt.\n>\n>   http.c |   36 ++++++++++++------------------------\n>   1 files changed, 12 insertions(+), 24 deletions(-)\n>\n> diff --git a/http.c b/http.c\n> index 256a5f1..8ae6432 100644\n> --- a/http.c\n> +++ b/http.c\n> @@ -13,14 +13,14 @@ static CURL *curl_default;\n>   char curl_errorstr[CURL_ERROR_SIZE];\n   ^\nThere is one spurious whitespace before \"char\" in the above line.\n\n>   static int curl_ssl_verify = -1;\n   ^\nIn the above line too.\n\n> -static char *ssl_cert = NULL;\n> +static const char *ssl_cert = NULL;\n\nThese 2 lines above are fine.\n\n>   #if LIBCURL_VERSION_NUM >= 0x070902\n   ^\nHere again there is one spurious whitespace.\n\n[...]\n\n>   static long curl_low_speed_time = -1;\n>   static int curl_ftp_no_epsv = 0;\n> @@ -100,39 +100,27 @@ static int http_options(const char *var, const \n> char *value)\n\n\"char *value)\" should have stayed on the same line as \"http_options(const char *var, const \".\n\nPlease try to send yourself your own patch and try to apply it using \"git am\", before you send it to the list. \n\nThanks,\nChristian.\n"},{"id":"74799","messageId":"b362b0fe0804200010t465b49absba03102cb1364021@mail.gmail.com","threadId":"13182","inReplyTo":"b362b0fe0804192354x2e91e45asca5dc74208e7be68@mail.gmail.com","subject":"Re: [PATCH (try 3)] http.c: 'use_git_config_string' on configuration options.","fromName":"Tordek","fromEmail":"kedrot@gmail.com","sentAt":"2008-04-20T07:10:26Z","receivedAt":"2008-04-20T07:10:26Z","isPatch":true,"sender":{"key":"kedrot@gmail.com","avatar":"https://gravatar.com/avatar/bebae16b32978df6b3e930ec82f6b7e72f5f6883cc6b26419929e0356e9f26a7?d=mp&s=160"},"body":"Signed-off-by: Guillermo O. Freschi <tordek@tordek.com.ar>\n---\nOkay, I'm skipping the middleman this time; Thunderbird mangles patches...\n http.c |   36 ++++++++++++------------------------\n 1 files changed, 12 insertions(+), 24 deletions(-)\n\ndiff --git a/http.c b/http.c\nindex 256a5f1..8ae6432 100644\n--- a/http.c\n+++ b/http.c\n@@ -13,14 +13,14 @@ static CURL *curl_default;\n char curl_errorstr[CURL_ERROR_SIZE];\n\n static int curl_ssl_verify = -1;\n-static char *ssl_cert = NULL;\n+static const char *ssl_cert = NULL;\n #if LIBCURL_VERSION_NUM >= 0x070902\n-static char *ssl_key = NULL;\n+static const char *ssl_key = NULL;\n #endif\n #if LIBCURL_VERSION_NUM >= 0x070908\n-static char *ssl_capath = NULL;\n+static const char *ssl_capath = NULL;\n #endif\n-static char *ssl_cainfo = NULL;\n+static const char *ssl_cainfo = NULL;\n static long curl_low_speed_limit = -1;\n static long curl_low_speed_time = -1;\n static int curl_ftp_no_epsv = 0;\n@@ -100,39 +100,27 @@ static int http_options(const char *var, const\nchar *value)\n \t}\n\n \tif (!strcmp(\"http.sslcert\", var)) {\n-\t\tif (ssl_cert == NULL) {\n-\t\t\tif (!value)\n-\t\t\t\treturn config_error_nonbool(var);\n-\t\t\tssl_cert = xstrdup(value);\n-\t\t}\n+\t\tif (ssl_cert == NULL)\n+\t\t\treturn git_config_string(&ssl_cert, var, value);\n \t\treturn 0;\n \t}\n #if LIBCURL_VERSION_NUM >= 0x070902\n \tif (!strcmp(\"http.sslkey\", var)) {\n-\t\tif (ssl_key == NULL) {\n-\t\t\tif (!value)\n-\t\t\t\treturn config_error_nonbool(var);\n-\t\t\tssl_key = xstrdup(value);\n-\t\t}\n+\t\tif (ssl_key == NULL)\n+\t\t\treturn git_config_string(&ssl_key, var, value);\n \t\treturn 0;\n \t}\n #endif\n #if LIBCURL_VERSION_NUM >= 0x070908\n \tif (!strcmp(\"http.sslcapath\", var)) {\n-\t\tif (ssl_capath == NULL) {\n-\t\t\tif (!value)\n-\t\t\t\treturn config_error_nonbool(var);\n-\t\t\tssl_capath = xstrdup(value);\n-\t\t}\n+\t\tif (ssl_capath == NULL)\n+\t\t\treturn git_config_string(&ssl_capath, var, value);\n \t\treturn 0;\n \t}\n #endif\n \tif (!strcmp(\"http.sslcainfo\", var)) {\n-\t\tif (ssl_cainfo == NULL) {\n-\t\t\tif (!value)\n-\t\t\t\treturn config_error_nonbool(var);\n-\t\t\tssl_cainfo = xstrdup(value);\n-\t\t}\n+\t\tif (ssl_cainfo == NULL)\n+\t\t\treturn git_config_string(&ssl_cainfo, var, value);\n \t\treturn 0;\n \t}\n\n-- \n1.5.2.2\n"},{"id":"74804","messageId":"20080420135412.GA7667@leksak.fem-net","threadId":"13182","inReplyTo":"7vwsmtdwy4.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH (try 3)] http.c: 'use_git_config_string' on configuration options.","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-04-20T13:54:12Z","receivedAt":"2008-04-20T13:54:12Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hi,\n\n> Heh, Christian, doesn't this patch look _suspiciously_ familiar ;-)?\n\nYes, you've put a bunch of `sample solutions' to the list and everyone who\nis able to search Gmane efficiently can find it.  But now I wouldn't say \nthat other solutions are cherry-picked from your sample solution even if\nthey look similar. ;-)\n\nRegards,\n  Stephan\n\n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"},{"id":"74812","messageId":"7viqyccx27.fsf@gitster.siamese.dyndns.org","threadId":"13182","inReplyTo":"480A7499.1040705@gmail.com","subject":"Re: [PATCH (try 3)] http.c: 'use_git_config_string' on configuration options.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-04-20T16:26:08Z","receivedAt":"2008-04-20T16:26:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tordek <kedrot@gmail.com> writes:\n\n> Signed-off-by: Guillermo O. Freschi <tordek@tordek.com.ar>\n> ---\n> My apologies, I had made a mistake on the previous attempt.\n\nPlease make up your mind as to who you want to claim to be.\n\nAre you \"Tordek <kedrot@gmail.com>\" without first-last name, or are you\n\"Guillermo O Freschi <tordek@tordek.com.ar>\"?\n\nI suspect the latter, but in that case, it is easier for me if you add an\nextra From: header at the top of the message.  In other words, do this:\n\n(The mail header, RFC 2822)\n\tFrom: Tordek <kedrot@gmail.com>\n\tSubject: [PATCH] http.c: use git_config_string() for parsing\n\tDate: .....\n\n(The mail body)\n\tFrom: Guillermo O. Freschi <tordek@tordek.com.ar>\n\n\t<<explain what the patch does here>>\n\n\tSigned-off-by: Guillermo O. Freschi <tordek@tordek.com.ar>\n\t---\n\t<<commentary, if any>>\n\t <<diffstat>>\n\t <<diff>>\n"}]}