From 93a644ea9d3702cc1cc62c0d413f81f8e46fabe7 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Mon, 19 May 2014 10:42:34 -0700 Subject: refs.c: make ref_transaction_begin take an err argument Add an err argument to _begin so that on non-fatal failures in future ref backends we can report a nice error back to the caller. While _begin can currently never fail for other reasons than OOM, in which case we die() anyway, we may add other types of backends in the future. For example, a hypothetical MySQL backend could fail in _begin with "Can not connect to MySQL server. No route to host". Signed-off-by: Ronnie Sahlberg Reviewed-by: Michael Haggerty Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- refs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'refs.h') diff --git a/refs.h b/refs.h index 71389a1f8..3f37c6509 100644 --- a/refs.h +++ b/refs.h @@ -262,7 +262,7 @@ enum action_on_err { * Begin a reference transaction. The reference transaction must * be freed by calling ref_transaction_free(). */ -struct ref_transaction *ref_transaction_begin(void); +struct ref_transaction *ref_transaction_begin(struct strbuf *err); /* * The following functions add a reference check or update to a -- cgit v1.2.1