packed_refs_lock(): report errors via a struct strbuf *err
That way the callers don't have to come up with error messages themselves. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b7de57d8d1
commit
c8bed835c2
@ -6,10 +6,10 @@ struct ref_store *packed_ref_store_create(const char *path,
|
||||
|
||||
/*
|
||||
* Lock the packed-refs file for writing. Flags is passed to
|
||||
* hold_lock_file_for_update(). Return 0 on success. On errors, set
|
||||
* errno appropriately and return a nonzero value.
|
||||
* hold_lock_file_for_update(). Return 0 on success. On errors, write
|
||||
* an error message to `err` and return a nonzero value.
|
||||
*/
|
||||
int packed_refs_lock(struct ref_store *ref_store, int flags);
|
||||
int packed_refs_lock(struct ref_store *ref_store, int flags, struct strbuf *err);
|
||||
|
||||
void add_packed_ref(struct ref_store *ref_store,
|
||||
const char *refname, const struct object_id *oid);
|
||||
|
Reference in New Issue
Block a user