1 #ifndef REFS_PACKED_BACKEND_H
2 #define REFS_PACKED_BACKEND_H
4 struct packed_ref_store
*packed_ref_store_create(
5 const char *path
, unsigned int store_flags
);
7 int packed_read_raw_ref(struct packed_ref_store
*refs
,
8 const char *refname
, unsigned char *sha1
,
9 struct strbuf
*referent
, unsigned int *type
);
11 int packed_peel_ref(struct packed_ref_store
*refs
,
12 const char *refname
, unsigned char *sha1
);
14 struct ref_iterator
*packed_ref_iterator_begin(
15 struct packed_ref_store
*refs
,
16 const char *prefix
, unsigned int flags
);
19 * Lock the packed-refs file for writing. Flags is passed to
20 * hold_lock_file_for_update(). Return 0 on success. On errors, set
21 * errno appropriately and return a nonzero value.
23 int lock_packed_refs(struct packed_ref_store
*refs
, int flags
);
25 void add_packed_ref(struct packed_ref_store
*refs
,
26 const char *refname
, const struct object_id
*oid
);
28 int commit_packed_refs(struct packed_ref_store
*refs
);
30 int repack_without_refs(struct packed_ref_store
*refs
,
31 struct string_list
*refnames
, struct strbuf
*err
);
33 #endif /* REFS_PACKED_BACKEND_H */