send-pack.c: mark a file-local function static
PATCH 1/1 send-pack.c: mark a file-local function static
Commit f2c681cf ("send-pack: support pushing from a shallow clone via http", 05-12-2013) adds the 'advertise_shallow_grafts_buf' function as an external symbol. This symbol does not require more than file visibility.
Noticed by sparse. ("'advertise_shallow_grafts_buf' was not declared. Should it be static?")
---
Hi Duy,
If you need to re-roll the patches in your 'nd/shallow-clone' branch, could you please squash this into your patch. Thanks!
BTW, I have not been following these patches, but I noticed that the 'remove_nonexistent_ours_in_pack()' function has no callers. (There are two commented out callers - but they seem to have *always* been commented out ;-) ). So, step 5 is no longer required? :-D
ATB,
Ramsay Jones
send-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
send-pack.c +1 -1
@@ -183,7 +183,7 @@ static int advertise_shallow_grafts_cb(const struct commit_graft *graft, void *creturn 0 ; } -void advertise_shallow_grafts_buf (struct strbuf *sb) +static void advertise_shallow_grafts_buf (struct strbuf *sb) {if (!is_repository_shallow ())return ;
Signature · 1 line
1.8.5
Quoted 4 lines · Ramsay Jones
BTW, I have not been following these patches, but I noticed that the '
remove_nonexistent_ours_in_pack()' function has no callers. (There are two commented out callers - but they seem to have *always* been commented out ;-) ). So, step 5 is no longer required? :-D
It's more of an optimization than a requirement, to avoid expensive calculation later. Uncommenting is possible but I need to pass the pack file name around a bit.
Signature · 1 line
Duy
Quoted 11 lines · Duy Nguyen
Quoted 4 lines · Ramsay Jones
BTW, I have not been following these patches, but I noticed that the '
remove_nonexistent_ours_in_pack()' function has no callers. (There are two commented out callers - but they seem to have *always* been commented out ;-) ). So, step 5 is no longer required? :-DIt's more of an optimization than a requirement, to avoid expensive calculation later. Uncommenting is possible but I need to pass the pack file name around a bit.
Ah, OK.
(I should probably refrain from commenting on code I haven't read ... :-P )
ATB,
Ramsay Jones