repack_without_refs(): make function private
It is no longer called from outside of the refs module. Also move its docstring and change it to imperative voice. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
a087b432a7
commit
79e4d8a9b8
9
refs.c
9
refs.c
@ -2736,7 +2736,14 @@ int pack_refs(unsigned int flags)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int repack_without_refs(struct string_list *refnames, struct strbuf *err)
|
/*
|
||||||
|
* Rewrite the packed-refs file, omitting any refs listed in
|
||||||
|
* 'refnames'. On error, leave packed-refs unchanged, write an error
|
||||||
|
* message to 'err', and return a nonzero value.
|
||||||
|
*
|
||||||
|
* The refs in 'refnames' needn't be sorted. `err` must not be NULL.
|
||||||
|
*/
|
||||||
|
static int repack_without_refs(struct string_list *refnames, struct strbuf *err)
|
||||||
{
|
{
|
||||||
struct ref_dir *packed;
|
struct ref_dir *packed;
|
||||||
struct string_list_item *refname;
|
struct string_list_item *refname;
|
||||||
|
11
refs.h
11
refs.h
@ -154,17 +154,6 @@ extern void rollback_packed_refs(void);
|
|||||||
*/
|
*/
|
||||||
int pack_refs(unsigned int flags);
|
int pack_refs(unsigned int flags);
|
||||||
|
|
||||||
/*
|
|
||||||
* Rewrite the packed-refs file, omitting any refs listed in
|
|
||||||
* 'refnames'. On error, packed-refs will be unchanged, the return
|
|
||||||
* value is nonzero, and a message about the error is written to the
|
|
||||||
* 'err' strbuf.
|
|
||||||
*
|
|
||||||
* The refs in 'refnames' needn't be sorted. `err` must not be NULL.
|
|
||||||
*/
|
|
||||||
extern int repack_without_refs(struct string_list *refnames,
|
|
||||||
struct strbuf *err);
|
|
||||||
|
|
||||||
extern int ref_exists(const char *);
|
extern int ref_exists(const char *);
|
||||||
|
|
||||||
extern int is_branch(const char *refname);
|
extern int is_branch(const char *refname);
|
||||||
|
Loading…
Reference in New Issue
Block a user