* [PATCH] tmp-objdir: mark some file local symbols static
@ 2016-10-01 23:07 Ramsay Jones
2016-10-02 12:13 ` Jeff King
0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2016-10-01 23:07 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, GIT Mailing-list
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Jeff,
If you need to re-roll your 'jk/quarantine-received-objects' branch,
could you please squash this into the relevant patches.
[I also note that tmp_objdir_destroy(), declared to be part of the
public interface, is not currently called from outside tmp_objdir.c.
Despite being unlikely, it is at least plausible that this function
may be useful in future. ;-) ]
Thanks!
ATB,
Ramsay Jones
builtin/receive-pack.c | 2 +-
tmp-objdir.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 25afa3f..4194088 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -87,7 +87,7 @@ static enum {
} use_keepalive;
static int keepalive_in_sec = 5;
-struct tmp_objdir *tmp_objdir;
+static struct tmp_objdir *tmp_objdir;
static enum deny_action parse_deny_action(const char *var, const char *value)
{
diff --git a/tmp-objdir.c b/tmp-objdir.c
index 2181a42..3a58404 100644
--- a/tmp-objdir.c
+++ b/tmp-objdir.c
@@ -17,7 +17,7 @@ struct tmp_objdir {
* more than one, and we can expand later if so. You can have many such
* tmp_objdirs simultaneously in many processes, of course.
*/
-struct tmp_objdir *the_tmp_objdir;
+static struct tmp_objdir *the_tmp_objdir;
static void tmp_objdir_free(struct tmp_objdir *t)
{
--
2.10.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tmp-objdir: mark some file local symbols static
2016-10-01 23:07 [PATCH] tmp-objdir: mark some file local symbols static Ramsay Jones
@ 2016-10-02 12:13 ` Jeff King
0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2016-10-02 12:13 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list
On Sun, Oct 02, 2016 at 12:07:27AM +0100, Ramsay Jones wrote:
> If you need to re-roll your 'jk/quarantine-received-objects' branch,
> could you please squash this into the relevant patches.
Oops, thanks. Don't know how I missed both of these.
> [I also note that tmp_objdir_destroy(), declared to be part of the
> public interface, is not currently called from outside tmp_objdir.c.
> Despite being unlikely, it is at least plausible that this function
> may be useful in future. ;-) ]
Yeah, builtin/receive-pack is happy to just rely on process death to
destroy it, but I think it's good to keep open an option for somebody to
do:
if (error) {
tmp_objdir_destroy(t);
return -1;
}
or similar.
-Peff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-02 12:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-01 23:07 [PATCH] tmp-objdir: mark some file local symbols static Ramsay Jones
2016-10-02 12:13 ` Jeff King
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).