summaryrefslogtreecommitdiff
path: root/receive-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-03-07 22:45:25 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-03-07 22:45:25 (GMT)
commit84da035f3862b72d103d21104a1f67b003d17ebb (patch)
tree74ff67c8a196b67f9d0160c7174e37ac3922a98a /receive-pack.c
parentdc49cd769b5fa6b7e0114b051c34a849828a7603 (diff)
parentef203f08564c1c6d267fedf8e0357c56d477892f (diff)
downloadgit-84da035f3862b72d103d21104a1f67b003d17ebb.zip
git-84da035f3862b72d103d21104a1f67b003d17ebb.tar.gz
git-84da035f3862b72d103d21104a1f67b003d17ebb.tar.bz2
Merge branch 'maint'
* maint: Catch write_ref_sha1 failure in receive-pack make t8001 work on Mac OS X again
Diffstat (limited to 'receive-pack.c')
-rw-r--r--receive-pack.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/receive-pack.c b/receive-pack.c
index 7f1dcc0..dda9854 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;