]> git.ipfire.org Git - thirdparty/git.git/blame - refs/packed-backend.h
packed_ref_store: make class into a subclass of `ref_store`
[thirdparty/git.git] / refs / packed-backend.h
CommitLineData
67be7c5a
MH
1#ifndef REFS_PACKED_BACKEND_H
2#define REFS_PACKED_BACKEND_H
3
e0cc8ac8
MH
4struct ref_store *packed_ref_store_create(const char *path,
5 unsigned int store_flags);
67be7c5a
MH
6
7/*
8 * Lock the packed-refs file for writing. Flags is passed to
9 * hold_lock_file_for_update(). Return 0 on success. On errors, set
10 * errno appropriately and return a nonzero value.
11 */
e0cc8ac8 12int lock_packed_refs(struct ref_store *ref_store, int flags);
67be7c5a 13
e0cc8ac8 14void add_packed_ref(struct ref_store *ref_store,
67be7c5a
MH
15 const char *refname, const struct object_id *oid);
16
e0cc8ac8 17int commit_packed_refs(struct ref_store *ref_store);
67be7c5a 18
e0cc8ac8 19int repack_without_refs(struct ref_store *ref_store,
67be7c5a
MH
20 struct string_list *refnames, struct strbuf *err);
21
22#endif /* REFS_PACKED_BACKEND_H */