remote rm/prune: print a message when writing packed-refs fails
authorRonnie Sahlberg <redacted>
Thu, 11 Sep 2014 15:42:57 +0000 (08:42 -0700)
committerJunio C Hamano <redacted>
Wed, 15 Oct 2014 17:47:26 +0000 (10:47 -0700)
commit2ebb49ca8ac34afb0ffe00e4bceac73e8c825ef1
tree6d08ad37be2ac2cc2b2bedbc558a7e5a510defcc
parent971c41c71728d057115b105f427202f98565f933
remote rm/prune: print a message when writing packed-refs fails

Until v2.1.0-rc0~22^2~11 (refs.c: add an err argument to
repack_without_refs, 2014-06-20), repack_without_refs forgot to
provide an error message when commit_packed_refs fails.  Even today,
it only provides a message for callers that pass a non-NULL err
parameter.  Internal callers in refs.c pass non-NULL err but
"git remote" does not.

That means that "git remote rm" and "git remote prune" can fail
without printing a message about why.  Fix them by passing in a
non-NULL err parameter and printing the returned message.

This is the last caller to a ref handling function passing err ==
NULL.  A later patch can drop support for err == NULL, avoiding such
problems in the future.

Signed-off-by: Ronnie Sahlberg <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Reviewed-by: Michael Haggerty <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/remote.c
git clone https://git.99rst.org/PROJECT