diff options
Diffstat (limited to 'receive-pack.c')
-rw-r--r-- | receive-pack.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/receive-pack.c b/receive-pack.c index 7311c822d..ea6872e46 100644 --- a/receive-pack.c +++ b/receive-pack.c @@ -158,7 +158,10 @@ static int update(struct command *cmd) cmd->error_string = "failed to lock"; return error("failed to lock %s", name); } - write_ref_sha1(lock, new_sha1, "push"); + if (write_ref_sha1(lock, new_sha1, "push")) { + cmd->error_string = "failed to write"; + return -1; /* error() already called */ + } fprintf(stderr, "%s: %s -> %s\n", name, old_hex, new_hex); } return 0; |