]>
Commit | Line | Data |
---|---|---|
67be7c5a MH |
1 | #ifndef REFS_PACKED_BACKEND_H |
2 | #define REFS_PACKED_BACKEND_H | |
3 | ||
e0cc8ac8 MH |
4 | struct 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 | |
c8bed835 MH |
9 | * hold_lock_file_for_update(). Return 0 on success. On errors, write |
10 | * an error message to `err` and return a nonzero value. | |
67be7c5a | 11 | */ |
c8bed835 | 12 | int packed_refs_lock(struct ref_store *ref_store, int flags, struct strbuf *err); |
67be7c5a | 13 | |
49aebcf4 MH |
14 | void packed_refs_unlock(struct ref_store *ref_store); |
15 | int packed_refs_is_locked(struct ref_store *ref_store); | |
16 | ||
e0cc8ac8 | 17 | void add_packed_ref(struct ref_store *ref_store, |
67be7c5a MH |
18 | const char *refname, const struct object_id *oid); |
19 | ||
3478983b | 20 | int commit_packed_refs(struct ref_store *ref_store, struct strbuf *err); |
67be7c5a | 21 | |
e0cc8ac8 | 22 | int repack_without_refs(struct ref_store *ref_store, |
67be7c5a MH |
23 | struct string_list *refnames, struct strbuf *err); |
24 | ||
25 | #endif /* REFS_PACKED_BACKEND_H */ |