From c8bed835c2a37056aa8f61769c6d8cc7f57bc4d3 Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Fri, 23 Jun 2017 09:01:42 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- refs/packed-backend.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'refs/packed-backend.h') diff --git a/refs/packed-backend.h b/refs/packed-backend.h index dbc00d339..210e3f35c 100644 --- a/refs/packed-backend.h +++ b/refs/packed-backend.h @@ -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); -- cgit v1.2.1