{"thread":{"id":"22086","subject":"[PATCH v2] Use warning function instead of fprintf(stderr, \"Warning: ...\").","startedAt":"2010-01-03T16:20:30Z","lastAt":"2010-01-04T00:41:36Z","messageCount":3,"participants":["Thiago Farina","Nanako Shiraishi","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"130734","messageId":"1262535630-3918-1-git-send-email-tfransosi@gmail.com","threadId":"22086","inReplyTo":null,"subject":"[PATCH v2] Use warning function instead of fprintf(stderr, \"Warning: ...\").","fromName":"Thiago Farina","fromEmail":"tfransosi@gmail.com","sentAt":"2010-01-03T16:20:30Z","receivedAt":"2010-01-03T16:20:30Z","isPatch":true,"sender":{"key":"tfransosi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/970071?v=4"},"body":"Signed-off-by: Thiago Farina <tfransosi@gmail.com>\n---\nRemoved the LF from the end of the strings.\n\n bisect.c     |    4 ++--\n builtin-mv.c |    4 +---\n http.c       |    2 +-\n 3 files changed, 4 insertions(+), 6 deletions(-)\n\ndiff --git a/bisect.c b/bisect.c\nindex dc18db8..f1a1f84 100644\n--- a/bisect.c\n+++ b/bisect.c\n@@ -813,11 +813,11 @@ static void handle_skipped_merge_base(const unsigned char *mb)\n \tchar *bad_hex = sha1_to_hex(current_bad_sha1);\n \tchar *good_hex = join_sha1_array_hex(&good_revs, ' ');\n \n-\tfprintf(stderr, \"Warning: the merge base between %s and [%s] \"\n+\twarning(\"the merge base between %s and [%s] \"\n \t\t\"must be skipped.\\n\"\n \t\t\"So we cannot be sure the first bad commit is \"\n \t\t\"between %s and %s.\\n\"\n-\t\t\"We continue anyway.\\n\",\n+\t\t\"We continue anyway.\",\n \t\tbad_hex, good_hex, mb_hex, bad_hex);\n \tfree(good_hex);\n }\ndiff --git a/builtin-mv.c b/builtin-mv.c\nindex f633d81..8247186 100644\n--- a/builtin-mv.c\n+++ b/builtin-mv.c\n@@ -169,9 +169,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \t\t\t\t * check both source and destination\n \t\t\t\t */\n \t\t\t\tif (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {\n-\t\t\t\t\tfprintf(stderr, \"Warning: %s;\"\n-\t\t\t\t\t\t\t\" will overwrite!\\n\",\n-\t\t\t\t\t\t\tbad);\n+\t\t\t\t\twarning(\"%s; will overwrite!\", bad);\n \t\t\t\t\tbad = NULL;\n \t\t\t\t} else\n \t\t\t\t\tbad = \"Cannot overwrite\";\ndiff --git a/http.c b/http.c\nindex ed6414a..455732f 100644\n--- a/http.c\n+++ b/http.c\n@@ -1244,7 +1244,7 @@ int finish_http_object_request(struct http_object_request *freq)\n \tprocess_http_object_request(freq);\n \n \tif (freq->http_code == 416) {\n-\t\tfprintf(stderr, \"Warning: requested range invalid; we may already have all the data.\\n\");\n+\t\twarning(\"requested range invalid; we may already have all the data.\");\n \t} else if (freq->curl_result != CURLE_OK) {\n \t\tif (stat(freq->tmpfile, &st) == 0)\n \t\t\tif (st.st_size == 0)\n-- \n1.6.6.75.g37bae\n"},{"id":"130739","messageId":"20100104091847.6117@nanako3.lavabit.com","threadId":"22086","inReplyTo":"1262535630-3918-1-git-send-email-tfransosi@gmail.com","subject":"Re: [PATCH v2] Use warning function instead of fprintf(stderr, \"Warning: ...\").","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2010-01-04T00:18:47Z","receivedAt":"2010-01-04T00:18:47Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Thiago Farina <tfransosi@gmail.com>\n\n> Signed-off-by: Thiago Farina <tfransosi@gmail.com>\n> ---\n> Removed the LF from the end of the strings.\n\nTrying this patch makes t6030-bisect-porcelain.sh fail for me. Was this tested at all?\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"130740","messageId":"7vljgevgzj.fsf@alter.siamese.dyndns.org","threadId":"22086","inReplyTo":"20100104091847.6117@nanako3.lavabit.com","subject":"Re: [PATCH v2] Use warning function instead of fprintf(stderr, \"Warning: ...\").","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-04T00:41:36Z","receivedAt":"2010-01-04T00:41:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nanako Shiraishi <nanako3@lavabit.com> writes:\n\n> Quoting Thiago Farina <tfransosi@gmail.com>\n>\n>> Signed-off-by: Thiago Farina <tfransosi@gmail.com>\n>> ---\n>> Removed the LF from the end of the strings.\n>\n> Trying this patch makes t6030-bisect-porcelain.sh fail for me. Was this tested at all?\n\nI noticed it as well; will squash this in.\n\ndiff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh\nindex def397c..c51865f 100755\n--- a/t/t6030-bisect-porcelain.sh\n+++ b/t/t6030-bisect-porcelain.sh\n@@ -423,7 +423,7 @@ test_expect_success 'skipped merge base when good and bad are siblings' '\n \tgrep \"merge base must be tested\" my_bisect_log.txt &&\n \tgrep $HASH4 my_bisect_log.txt &&\n \tgit bisect skip > my_bisect_log.txt 2>&1 &&\n-\tgrep \"Warning\" my_bisect_log.txt &&\n+\tgrep \"warning\" my_bisect_log.txt &&\n \tgrep $SIDE_HASH6 my_bisect_log.txt &&\n \tgit bisect reset\n '\n"}]}