X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=tar-tree.c;h=96bd1438d9033e5bca3841fb85a531ea27070faf;hb=457f06d68e427bbf4f1a921877441a622a05e5c4;hp=970c4bb54e148282a89f1249a96deca880bccafd;hpb=302ebfe52192fff9a2c1c612dff22325fd073acc;p=git.git diff --git a/tar-tree.c b/tar-tree.c index 970c4bb5..96bd1438 100644 --- a/tar-tree.c +++ b/tar-tree.c @@ -34,10 +34,8 @@ struct path_prefix { static void reliable_write(void *buf, unsigned long size) { while (size > 0) { - long ret = write(1, buf, size); + long ret = xwrite(1, buf, size); if (ret < 0) { - if (errno == EAGAIN) - continue; if (errno == EPIPE) exit(0); die("git-tar-tree: %s", strerror(errno)); @@ -407,6 +405,8 @@ int main(int argc, char **argv) void *buffer; unsigned long size; + setup_git_directory(); + switch (argc) { case 3: basedir = argv[2];