From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: David Turner <dturner@twopensource.com>
Cc: Junio C Hamano <gitster@pobox.com>,
GIT Mailing-list <git@vger.kernel.org>
Subject: [PATCH] refs: mark some symbols static
Date: Sat, 12 Dec 2015 14:33:19 +0000 [thread overview]
Message-ID: <566C302F.8090103@ramsayjones.plus.com> (raw)
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi David,
If you need to re-roll your 'dt/refs-backend-lmdb' branch, could
you please squash the relevant parts of this patch into yours.
[yes, I didn't reference the movement of the external declaration
in the commit message! :-D ]
Thanks!
ATB,
Ramsay Jones
refs.c | 7 +++----
refs/files-backend.c | 2 +-
refs/refs-internal.h | 2 ++
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/refs.c b/refs.c
index 0be7065..c0faa97 100644
--- a/refs.c
+++ b/refs.c
@@ -9,7 +9,7 @@
#include "object.h"
#include "tag.h"
-const char split_transaction_fail_warning[] =
+static const char split_transaction_fail_warning[] =
"A ref transaction was split across two refs backends. Part of the "
"transaction succeeded, but then the update to the per-worktree refs "
"failed. Your repository may be in an inconsistent state.";
@@ -17,12 +17,11 @@ const char split_transaction_fail_warning[] =
/*
* We always have a files backend and it is the default.
*/
-extern struct ref_be refs_be_files;
-struct ref_be *the_refs_backend = &refs_be_files;
+static struct ref_be *the_refs_backend = &refs_be_files;
/*
* List of all available backends
*/
-struct ref_be *refs_backends = &refs_be_files;
+static struct ref_be *refs_backends = &refs_be_files;
const char *refs_backend_type;
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 0efc507..e8181ae 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -3280,7 +3280,7 @@ static int ref_present(const char *refname,
return string_list_has_string(affected_refnames, refname);
}
-void files_init_backend(void *data)
+static void files_init_backend(void *data)
{
/* do nothing */
}
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index 9c17fdf..8fb360d 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -313,4 +313,6 @@ struct ref_be {
for_each_replace_ref_fn *for_each_replace_ref;
};
+extern struct ref_be refs_be_files;
+
#endif /* REFS_REFS_INTERNAL_H */
--
2.6.0
next reply other threads:[~2015-12-12 14:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-12 14:33 Ramsay Jones [this message]
2015-12-14 18:55 ` [PATCH] refs: mark some symbols static David Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=566C302F.8090103@ramsayjones.plus.com \
--to=ramsay@ramsayjones.plus.com \
--cc=dturner@twopensource.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.