refs: mark some symbols static
PATCH 1/1 refs: mark some symbols static
Signed-off-by Ramsay Jones <[email protected]>
---
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(-)
refs.c +3 -4
@@ -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;
refs/files-backend.c +1 -1
@@ -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 */ }
refs/refs-internal.h +2 -0
@@ -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 */
Signature · 1 line
2.6.0
Will do.
Quoted 73 lines · Ramsay Jones
Signed-off-by Ramsay Jones <[email protected]>---
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 Jonesrefs.c | 7 +++---- refs/files-backend.c | 2 +- refs/refs-internal.h | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-)refs.c +3
-4@@ -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;refs/files-backend.c +1
-1@@ -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 */ }refs/refs-internal.h +2
-0@@ -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 */