Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  Catch write_ref_sha1 failure in receive-pack
  make t8001 work on Mac OS X again
  • Loading branch information
Junio C Hamano committed Mar 7, 2007
2 parents dc49cd7 + ef203f0 commit 84da035
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion receive-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion t/annotate-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 84da035

Please sign in to comment.