{"thread":{"id":"35525","subject":"[PATCH] send-pack.c: mark a file-local function static","startedAt":"2013-12-12T23:15:54Z","lastAt":"2013-12-13T22:50:25Z","messageCount":3,"participants":["Ramsay Jones","Duy Nguyen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"231966","messageId":"52AA43AA.9030703@ramsay1.demon.co.uk","threadId":"35525","inReplyTo":null,"subject":"[PATCH] send-pack.c: mark a file-local function static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-12-12T23:15:54Z","receivedAt":"2013-12-12T23:15:54Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nCommit f2c681cf (\"send-pack: support pushing from a shallow clone\nvia http\", 05-12-2013) adds the 'advertise_shallow_grafts_buf'\nfunction as an external symbol. This symbol does not require\nmore than file visibility.\n\nNoticed by sparse. (\"'advertise_shallow_grafts_buf' was not declared.\nShould it be static?\")\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Duy,\n\nIf you need to re-roll the patches in your 'nd/shallow-clone' branch,\ncould you please squash this into your patch. Thanks!\n\nBTW, I have not been following these patches, but I noticed that the\n'remove_nonexistent_ours_in_pack()' function has no callers. (There are\ntwo commented out callers - but they seem to have *always* been commented\nout ;-) ). So, step 5 is no longer required? :-D\n\nATB,\nRamsay Jones\n\n send-pack.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/send-pack.c b/send-pack.c\nindex 2a199cc..6129b0f 100644\n--- a/send-pack.c\n+++ b/send-pack.c\n@@ -183,7 +183,7 @@ static int advertise_shallow_grafts_cb(const struct commit_graft *graft, void *c\n \treturn 0;\n }\n \n-void advertise_shallow_grafts_buf(struct strbuf *sb)\n+static void advertise_shallow_grafts_buf(struct strbuf *sb)\n {\n \tif (!is_repository_shallow())\n \t\treturn;\n-- \n1.8.5\n"},{"id":"231969","messageId":"CACsJy8DnVUc2xQGD4hr2tuFhaGj4kuc=63xxmmUwq1bkFtztOw@mail.gmail.com","threadId":"35525","inReplyTo":"52AA43AA.9030703@ramsay1.demon.co.uk","subject":"Re: [PATCH] send-pack.c: mark a file-local function static","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2013-12-13T00:58:46Z","receivedAt":"2013-12-13T00:58:46Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Fri, Dec 13, 2013 at 6:15 AM, Ramsay Jones\n<ramsay@ramsay1.demon.co.uk> wrote:\n> BTW, I have not been following these patches, but I noticed that the\n> 'remove_nonexistent_ours_in_pack()' function has no callers. (There are\n> two commented out callers - but they seem to have *always* been commented\n> out ;-) ). So, step 5 is no longer required? :-D\n\nIt's more of an optimization than a requirement, to avoid expensive\ncalculation later. Uncommenting is possible but I need to pass the\npack file name around a bit.\n-- \nDuy\n"},{"id":"231984","messageId":"52AB8F31.40107@ramsay1.demon.co.uk","threadId":"35525","inReplyTo":"CACsJy8DnVUc2xQGD4hr2tuFhaGj4kuc=63xxmmUwq1bkFtztOw@mail.gmail.com","subject":"Re: [PATCH] send-pack.c: mark a file-local function static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-12-13T22:50:25Z","receivedAt":"2013-12-13T22:50:25Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"On 13/12/13 00:58, Duy Nguyen wrote:\n> On Fri, Dec 13, 2013 at 6:15 AM, Ramsay Jones\n> <ramsay@ramsay1.demon.co.uk> wrote:\n>> BTW, I have not been following these patches, but I noticed that the\n>> 'remove_nonexistent_ours_in_pack()' function has no callers. (There are\n>> two commented out callers - but they seem to have *always* been commented\n>> out ;-) ). So, step 5 is no longer required? :-D\n> \n> It's more of an optimization than a requirement, to avoid expensive\n> calculation later. Uncommenting is possible but I need to pass the\n> pack file name around a bit.\n> \n\nAh, OK.\n\n(I should probably refrain from commenting on code I haven't read ... :-P )\n\nATB,\nRamsay Jones\n"}]}