Skip to content

Commit 697d7f5

Browse files
Nanako Shiraishispearce
authored andcommitted
remote.c: make free_ref(), parse_push_refspec() and free_refspecs() static.
These functions are not used by any other file. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
1 parent 3b9b116 commit 697d7f5

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

remote.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ static int verify_refname(char *name, int is_glob)
455455
* and dst pointers are always freeable pointers as well
456456
* as the refspec pointer itself.
457457
*/
458-
void free_refspecs(struct refspec *refspec, int nr_refspec)
458+
static void free_refspecs(struct refspec *refspec, int nr_refspec)
459459
{
460460
int i;
461461

@@ -613,7 +613,7 @@ struct refspec *parse_fetch_refspec(int nr_refspec, const char **refspec)
613613
return parse_refspec_internal(nr_refspec, refspec, 1, 0);
614614
}
615615

616-
struct refspec *parse_push_refspec(int nr_refspec, const char **refspec)
616+
static struct refspec *parse_push_refspec(int nr_refspec, const char **refspec)
617617
{
618618
return parse_refspec_internal(nr_refspec, refspec, 0, 0);
619619
}
@@ -783,7 +783,7 @@ struct ref *copy_ref_list(const struct ref *ref)
783783
return ret;
784784
}
785785

786-
void free_ref(struct ref *ref)
786+
static void free_ref(struct ref *ref)
787787
{
788788
if (!ref)
789789
return;

remote.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ void ref_remove_duplicates(struct ref *ref_map);
7777

7878
int valid_fetch_refspec(const char *refspec);
7979
struct refspec *parse_fetch_refspec(int nr_refspec, const char **refspec);
80-
struct refspec *parse_push_refspec(int nr_refspec, const char **refspec);
81-
void free_refspecs(struct refspec *refspec, int nr_refspec);
8280

8381
int match_refs(struct ref *src, struct ref *dst, struct ref ***dst_tail,
8482
int nr_refspec, const char **refspec, int all);

0 commit comments

Comments
 (0)