refs.c: remove the update_ref_write function
commita8f475788fc8685ff1f4efcb418101a4905fd364
authorRonnie Sahlberg <sahlberg@google.com>
Tue, 29 Apr 2014 20:42:07 +0000 (29 13:42 -0700)
committerJonathan Nieder <jrnieder@gmail.com>
Tue, 2 Sep 2014 20:45:18 +0000 (2 13:45 -0700)
tree0f5078ca8e36b079d3fc69d7f6f3290144cf7c36
parentff1acf67e1d1355bb07e93ae3572e17b8cc72d39
refs.c: remove the update_ref_write function

Since we only call update_ref_write from a single place and we only call it
with onerr==QUIET_ON_ERR we can just as well get rid of it and just call
write_ref_sha1 directly. This changes the return status for _commit from
1 to -1 on failures when writing to the ref. Eventually we will want
_commit to start returning more detailed error conditions than the current
simple success/failure.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
refs.c