Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
repack_without_refs(): make function private
author
Michael Haggerty
<mhagger@alum.mit.edu>
Mon, 22 Jun 2015 14:03:00 +0000
(16:03 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 22 Jun 2015 20:17:11 +0000
(13:17 -0700)
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>
refs.c
patch
|
blob
|
history
refs.h
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
a087b43
)
diff --git
a/refs.c
b/refs.c
index e40989431fc6c5adaaf23de59dedc65e62306470..081ea6eada6b4193ac6e14c35054e5447471c0b0 100644
(file)
--- a/
refs.c
+++ b/
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 string_list_item *refname;
{
struct ref_dir *packed;
struct string_list_item *refname;
diff --git
a/refs.h
b/refs.h
index 1a5d44a97453d6a9bea9ff618fe7977d739a669a..5f3bea7a42b474e7f6cfe1fa9dcdd2c184b3f722 100644
(file)
--- a/
refs.h
+++ b/
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 is_branch(const char *refname);
extern int ref_exists(const char *);
extern int is_branch(const char *refname);