{"thread":{"id":"35997","subject":"[PATCH] builtin/pack-objects.c:write_pack_file() replace tmpname with pack_tmp_name in warning","startedAt":"2014-02-28T16:26:14Z","lastAt":"2014-02-28T20:05:24Z","messageCount":2,"participants":["Sun He","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"235632","messageId":"1393604774-19480-1-git-send-email-sunheehnus@gmail.com","threadId":"35997","inReplyTo":null,"subject":"[PATCH] builtin/pack-objects.c:write_pack_file() replace tmpname with pack_tmp_name in warning","fromName":"Sun He","fromEmail":"sunheehnus@gmail.com","sentAt":"2014-02-28T16:26:14Z","receivedAt":"2014-02-28T16:26:14Z","isPatch":true,"sender":{"key":"sunheehnus@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2889804?v=4"},"body":"Signed-off-by: Sun He <sunheehnus@gmail.com>\n---\nThe tmpname is uninitialized and it should a bug\n\nPlease ignore the former patches about this with wrong format.\nI am sorry to cause a jam in your inbox. ^_^\n\nIn the end, I wanna thank Michael Haggerty who give me help.\n\n builtin/pack-objects.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/pack-objects.c b/builtin/pack-objects.c\nindex c733379..4922ce5 100644\n--- a/builtin/pack-objects.c\n+++ b/builtin/pack-objects.c\n@@ -823,7 +823,7 @@ static void write_pack_file(void)\n \t\t\t\tutb.modtime = --last_mtime;\n \t\t\t\tif (utime(pack_tmp_name, &utb) < 0)\n \t\t\t\t\twarning(\"failed utime() on %s: %s\",\n-\t\t\t\t\t\ttmpname, strerror(errno));\n+\t\t\t\t\t\tpack_tmp_name, strerror(errno));\n \t\t\t}\n \n \t\t\t/* Enough space for \"-<sha-1>.pack\"? */\n-- \n1.9.0.138.g2de3478.dirty\n"},{"id":"235664","messageId":"xmqqob1rt33v.fsf@gitster.dls.corp.google.com","threadId":"35997","inReplyTo":"1393604774-19480-1-git-send-email-sunheehnus@gmail.com","subject":"Re: [PATCH] builtin/pack-objects.c:write_pack_file() replace tmpname with pack_tmp_name in warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-02-28T20:05:24Z","receivedAt":"2014-02-28T20:05:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sun He <sunheehnus@gmail.com> writes:\n\n> Signed-off-by: Sun He <sunheehnus@gmail.com>\n> ---\n> The tmpname is uninitialized and it should a bug\n>\n> Please ignore the former patches about this with wrong format.\n> I am sorry to cause a jam in your inbox. ^_^\n>\n> In the end, I wanna thank Michael Haggerty who give me help.\n\nIf you look at \"git log\" output, you would notice that people write\nsomething like\n\n\tHelped-by: Michael Haggerty <mhagger@alum.mit.edu>\n\nbefore your S-o-b: line for a case like this.\n\nWe can see that you are replacing tmpname with pack_tmp_name in\nwarning without you writing on the subject line.  The commit log is\nwhere you explain *why* that change is the right thing to do.  And\nthat is totally lacking in this message.\n\n\n>  builtin/pack-objects.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c\n> index c733379..4922ce5 100644\n> --- a/builtin/pack-objects.c\n> +++ b/builtin/pack-objects.c\n> @@ -823,7 +823,7 @@ static void write_pack_file(void)\n>  \t\t\t\tutb.modtime = --last_mtime;\n>  \t\t\t\tif (utime(pack_tmp_name, &utb) < 0)\n>  \t\t\t\t\twarning(\"failed utime() on %s: %s\",\n> -\t\t\t\t\t\ttmpname, strerror(errno));\n> +\t\t\t\t\t\tpack_tmp_name, strerror(errno));\n>  \t\t\t}\n>  \n>  \t\t\t/* Enough space for \"-<sha-1>.pack\"? */\n"}]}