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>
Michael Haggerty committed
Jun 22, 2015 at 16:03 UTC
79e4d8a9b839ed18816e78ed52f0ff5a5f6e9a63
2 files changed
+8
-12
refs.c
+8
-1
@@ -2736,7 +2736,14 @@ int pack_refs(unsigned int flags)
2736
return 0;
2737
}
2738
2739
-int repack_without_refs(struct string_list *refnames, struct strbuf *err)
2739
+/*
2740
+ * Rewrite the packed-refs file, omitting any refs listed in
2741
+ * 'refnames'. On error, leave packed-refs unchanged, write an error
2742
+ * message to 'err', and return a nonzero value.
2743
+ *
2744
+ * The refs in 'refnames' needn't be sorted. `err` must not be NULL.
2745
+ */
2746
+static int repack_without_refs(struct string_list *refnames, struct strbuf *err)
2747
{
2748
struct ref_dir *packed;
2749
struct string_list_item *refname;
refs.h
-11
@@ -154,17 +154,6 @@ extern void rollback_packed_refs(void);
154
*/
155
int pack_refs(unsigned int flags);
156
157
-/*
158
- * Rewrite the packed-refs file, omitting any refs listed in
159
- * 'refnames'. On error, packed-refs will be unchanged, the return
160
- * value is nonzero, and a message about the error is written to the
161
- * 'err' strbuf.
162
- *
163
- * The refs in 'refnames' needn't be sorted. `err` must not be NULL.
164
- */
165
-extern int repack_without_refs(struct string_list *refnames,
166
- struct strbuf *err);
167
-
157
extern int ref_exists(const char *);
158
159
extern int is_branch(const char *refname);