Introduce core.sharedrepository
[git.git] / tar-tree.c
index 970c4bb..96bd143 100644 (file)
@@ -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];