summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <sahlberg@google.com>2014-05-19 17:42:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-09-03 17:04:08 (GMT)
commit93a644ea9d3702cc1cc62c0d413f81f8e46fabe7 (patch)
tree5a979693e1d3c05ced16fde95b012f6d951e496f /refs.c
parent8c8bdc0d3582e42c13815a191344b1aa3e06c792 (diff)
downloadgit-93a644ea9d3702cc1cc62c0d413f81f8e46fabe7.zip
git-93a644ea9d3702cc1cc62c0d413f81f8e46fabe7.tar.gz
git-93a644ea9d3702cc1cc62c0d413f81f8e46fabe7.tar.bz2
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 <sahlberg@google.com> Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 40f04f4..9cb7908 100644
--- a/refs.c
+++ b/refs.c
@@ -3397,7 +3397,7 @@ struct ref_transaction {
size_t nr;
};
-struct ref_transaction *ref_transaction_begin(void)
+struct ref_transaction *ref_transaction_begin(struct strbuf *err)
{
return xcalloc(1, sizeof(struct ref_transaction));
}