summaryrefslogtreecommitdiff
path: root/refs/packed-backend.h
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2017-06-23 09:01:42 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-06-23 13:27:33 -0700
commitc8bed835c2a37056aa8f61769c6d8cc7f57bc4d3 (patch)
tree9ec114009b6eb784ff0f3ce89aa54268f7c1eeea /refs/packed-backend.h
parentpacked_refs_lock(): function renamed from lock_packed_refs() (diff)
downloadtgif-c8bed835c2a37056aa8f61769c6d8cc7f57bc4d3.tar.xz
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>
Diffstat (limited to 'refs/packed-backend.h')
-rw-r--r--refs/packed-backend.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/refs/packed-backend.h b/refs/packed-backend.h
index dbc00d3396..210e3f35ce 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);