diff options
author | Junio C Hamano <junkio@cox.net> | 2007-03-07 14:45:25 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-03-07 14:45:25 -0800 |
commit | 84da035f3862b72d103d21104a1f67b003d17ebb (patch) | |
tree | 74ff67c8a196b67f9d0160c7174e37ac3922a98a | |
parent | Cast 64 bit off_t to 32 bit size_t (diff) | |
parent | Catch write_ref_sha1 failure in receive-pack (diff) | |
download | tgif-84da035f3862b72d103d21104a1f67b003d17ebb.tar.xz |
Merge branch 'maint'
* maint:
Catch write_ref_sha1 failure in receive-pack
make t8001 work on Mac OS X again
-rw-r--r-- | receive-pack.c | 5 | ||||
-rw-r--r-- | t/annotate-tests.sh | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/receive-pack.c b/receive-pack.c index 7f1dcc045c..dda98549ca 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; diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh index 87403da780..cacb273aff 100644 --- a/t/annotate-tests.sh +++ b/t/annotate-tests.sh @@ -114,7 +114,8 @@ test_expect_success \ test_expect_success \ 'some edit' \ 'mv file file.orig && - sed -e "s/^3A/99/" -e "/^1A/d" < file.orig > file && + sed -e "s/^3A/99/" -e "/^1A/d" -e "/^incomplete/d" < file.orig > file && + echo "incomplete" | tr -d "\\012" >>file && GIT_AUTHOR_NAME="D" git commit -a -m "edit"' test_expect_success \ |