Code

glossary: Add definitions for dangling and unreachable objects
[git.git] / upload-pack.c
index 03a4156e19655c1f1d724163d0a712f63fc72c6e..3648aae1a777aec4bba77b40b9cf6da484190441 100644 (file)
@@ -55,6 +55,7 @@ static ssize_t send_client_data(int fd, const char *data, ssize_t sz)
                /* emergency quit */
                fd = 2;
        if (fd == 2) {
+               /* XXX: are we happy to lose stuff here? */
                xwrite(fd, data, sz);
                return sz;
        }
@@ -671,7 +672,8 @@ int main(int argc, char **argv)
 
        if (!enter_repo(dir, strict))
                die("'%s': unable to chdir or not a git archive", dir);
-
+       if (is_repository_shallow())
+               die("attempt to fetch/clone from a shallow repository");
        upload_pack();
        return 0;
 }