refs.c: do not permit err == NULL
commitcda3097952263ee78e316bf68a93554949162bdf
authorJonathan Nieder <jrnieder@gmail.com>
Thu, 28 Aug 2014 23:42:37 +0000 (28 16:42 -0700)
committerJonathan Nieder <jrnieder@gmail.com>
Tue, 14 Oct 2014 23:39:14 +0000 (14 16:39 -0700)
tree38074392c2d451c01d39eef81ad5fc26953df735
parentd551dbda0c78cf40bccb0ccdfbe3303220102deb
refs.c: do not permit err == NULL

Some functions that take a strbuf argument to append an error treat
!err as an indication that the message should be suppressed (e.g.,
ref_update_reject_duplicates).  Others write the message to stderr on
!err (e.g., repack_without_refs).  Others crash (e.g.,
ref_transaction_update).

Some of these behaviors are for historical reasons and others were
accidents.  Luckily no callers pass err == NULL any more.  Simplify
by consistently requiring the strbuf argument.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Reviewed-by: Ronnie Sahlberg <sahlberg@google.com>
refs.c