aboutsummaryrefslogtreecommitdiff
path: root/refs/packed-backend.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-06-23 09:01:42 +0200
committerJunio C Hamano <gitster@pobox.com>2017-06-23 13:27:33 -0700
commitc8bed835c2a37056aa8f61769c6d8cc7f57bc4d3 (patch)
tree9ec114009b6eb784ff0f3ce89aa54268f7c1eeea /refs/packed-backend.h
parentb7de57d8d18a08ab517b4d01151129f521185271 (diff)
downloadgit-c8bed835c2a37056aa8f61769c6d8cc7f57bc4d3.tar.gz
git-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 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);