summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eedf8f9)
raw | patch | inline | side by side (parent: eedf8f9)
author | Carl Worth <cworth@cworth.org> | |
Sat, 18 Feb 2006 00:14:52 +0000 (16:14 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 18 Feb 2006 00:20:51 +0000 (16:20 -0800) |
Signed-off-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c | patch | blob | history | |
upload-pack.c | patch | blob | history |
diff --git a/sha1_file.c b/sha1_file.c
index 3d11a9bfdc56c00056c2057af5e6455742ab31f5..f08b1d6ee84617d8d866e9dab66e95ce5a5cc420 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
sprintf(path, "%s/pack", objdir);
len = strlen(path);
dir = opendir(path);
- if (!dir)
+ if (!dir) {
+ fprintf(stderr, "unable to open object pack directory: %s: %s\n", path, strerror(errno));
return;
+ }
path[len++] = '/';
while ((de = readdir(dir)) != NULL) {
int namelen = strlen(de->d_name);
diff --git a/upload-pack.c b/upload-pack.c
index d1980556ca5b9c62a76129907cc511cd5c0c6c83..3606529f61c50aa1c4d73877ccc4601ef036fcb5 100644 (file)
--- a/upload-pack.c
+++ b/upload-pack.c
static char *capabilities = "multi_ack";
struct object *o = parse_object(sha1);
+ if (!o)
+ die("git-upload-pack: cannot find object %s:", sha1_to_hex(sha1));
+
if (capabilities)
packet_write(1, "%s %s%c%s\n", sha1_to_hex(sha1), refname,
0, capabilities);