diff --git a/upload-pack.c b/upload-pack.c
index c568ef066c9e7e0021468cfe7cb904f40ac477f1..3648aae1a777aec4bba77b40b9cf6da484190441 100644 (file)
--- a/upload-pack.c
+++ b/upload-pack.c
/* emergency quit */
fd = 2;
if (fd == 2) {
/* emergency quit */
fd = 2;
if (fd == 2) {
+ /* XXX: are we happy to lose stuff here? */
xwrite(fd, data, sz);
return sz;
}
xwrite(fd, data, sz);
return sz;
}
*cp++ = buffered;
outsz++;
}
*cp++ = buffered;
outsz++;
}
- sz = read(pu_pipe[0], cp,
+ sz = xread(pu_pipe[0], cp,
sizeof(data) - outsz);
if (0 < sz)
;
sizeof(data) - outsz);
if (0 < sz)
;
/* Status ready; we ship that in the side-band
* or dump to the standard error.
*/
/* Status ready; we ship that in the side-band
* or dump to the standard error.
*/
- sz = read(pe_pipe[0], progress,
+ sz = xread(pe_pipe[0], progress,
sizeof(progress));
if (0 < sz)
send_client_data(2, progress, sz);
sizeof(progress));
if (0 < sz)
send_client_data(2, progress, sz);
if (!enter_repo(dir, strict))
die("'%s': unable to chdir or not a git archive", dir);
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;
}
upload_pack();
return 0;
}