* [PATCH] refs: mark some symbols static
@ 2015-12-12 14:33 Ramsay Jones
2015-12-14 18:55 ` David Turner
0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2015-12-12 14:33 UTC (permalink / raw)
To: David Turner; +Cc: Junio C Hamano, GIT Mailing-list
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] refs: mark some symbols static
2015-12-12 14:33 [PATCH] refs: mark some symbols static Ramsay Jones
@ 2015-12-14 18:55 ` David Turner
0 siblings, 0 replies; 2+ messages in thread
From: David Turner @ 2015-12-14 18:55 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list
Will do.
On Sat, 2015-12-12 at 14:33 +0000, Ramsay Jones wrote:
> 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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-14 18:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-12 14:33 [PATCH] refs: mark some symbols static Ramsay Jones
2015-12-14 18:55 ` David Turner
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).