git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] send-pack.c: mark a file-local function static
@ 2013-12-12 23:15 Ramsay Jones
  2013-12-13  0:58 ` Duy Nguyen
  0 siblings, 1 reply; 3+ messages in thread
From: Ramsay Jones @ 2013-12-12 23:15 UTC (permalink / raw)
  To: Nguyen Thai Ngoc Duy; +Cc: Junio C Hamano, GIT Mailing-list


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?")

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---

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(-)

diff --git a/send-pack.c b/send-pack.c
index 2a199cc..6129b0f 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -183,7 +183,7 @@ static int advertise_shallow_grafts_cb(const struct commit_graft *graft, void *c
 	return 0;
 }
 
-void advertise_shallow_grafts_buf(struct strbuf *sb)
+static void advertise_shallow_grafts_buf(struct strbuf *sb)
 {
 	if (!is_repository_shallow())
 		return;
-- 
1.8.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] send-pack.c: mark a file-local function static
  2013-12-12 23:15 [PATCH] send-pack.c: mark a file-local function static Ramsay Jones
@ 2013-12-13  0:58 ` Duy Nguyen
  2013-12-13 22:50   ` Ramsay Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Duy Nguyen @ 2013-12-13  0:58 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list

On Fri, Dec 13, 2013 at 6:15 AM, Ramsay Jones
<ramsay@ramsay1.demon.co.uk> wrote:
> 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.
-- 
Duy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] send-pack.c: mark a file-local function static
  2013-12-13  0:58 ` Duy Nguyen
@ 2013-12-13 22:50   ` Ramsay Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Ramsay Jones @ 2013-12-13 22:50 UTC (permalink / raw)
  To: Duy Nguyen; +Cc: Junio C Hamano, GIT Mailing-list

On 13/12/13 00:58, Duy Nguyen wrote:
> On Fri, Dec 13, 2013 at 6:15 AM, Ramsay Jones
> <ramsay@ramsay1.demon.co.uk> wrote:
>> 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.
> 

Ah, OK.

(I should probably refrain from commenting on code I haven't read ... :-P )

ATB,
Ramsay Jones

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-13 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-12 23:15 [PATCH] send-pack.c: mark a file-local function static Ramsay Jones
2013-12-13  0:58 ` Duy Nguyen
2013-12-13 22:50   ` Ramsay Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).