Merge fixes up to GIT 1.2.2
authorJunio C Hamano <junkio@cox.net>
Sun, 19 Feb 2006 06:55:42 +0000 (22:55 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 19 Feb 2006 06:55:42 +0000 (22:55 -0800)
1  2 
rev-parse.c
sha1_file.c
diff --combined rev-parse.c
index 9161faed1e916c0a3d53c0df4905a2261e626131,70a82714ca061db579838662189049d94453c9e3..a5fb93c3ca993dc240f87a9ac5ee6447b10b7cad
@@@ -48,7 -48,6 +48,7 @@@ static int is_rev_argument(const char *
                "--show-breaks",
                "--sparse",
                "--topo-order",
 +              "--date-order",
                "--unpacked",
                NULL
        };
@@@ -226,12 -225,12 +226,12 @@@ int main(int argc, char **argv
                                continue;
                        }
                        if (!strcmp(arg, "--short") ||
-                           !strncmp(arg, "--short=", 9)) {
+                           !strncmp(arg, "--short=", 8)) {
                                filter &= ~(DO_FLAGS|DO_NOREV);
                                verify = 1;
                                abbrev = DEFAULT_ABBREV;
-                               if (arg[8] == '=')
-                                       abbrev = strtoul(arg + 9, NULL, 10);
+                               if (arg[7] == '=')
+                                       abbrev = strtoul(arg + 8, NULL, 10);
                                if (abbrev < MINIMUM_ABBREV)
                                        abbrev = MINIMUM_ABBREV;
                                else if (40 <= abbrev)
diff --combined sha1_file.c
index 64cf2454182dbf4cbf1a2ee70dea4823cf8cfaa0,f08b1d6ee84617d8d866e9dab66e95ce5a5cc420..1d799f793a936a696cea86deb36fa2bdb04c29f4
@@@ -551,8 -551,10 +551,10 @@@ static void prepare_packed_git_one(cha
        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);
@@@ -830,7 -832,7 +832,7 @@@ void packed_object_info_detail(struct p
                               char *type,
                               unsigned long *size,
                               unsigned long *store_size,
 -                             int *delta_chain_length,
 +                             unsigned int *delta_chain_length,
                               unsigned char *base_sha1)
  {
        struct packed_git *p = e->p;
        if (kind != OBJ_DELTA)
                *delta_chain_length = 0;
        else {
 -              int chain_length = 0;
 +              unsigned int chain_length = 0;
                memcpy(base_sha1, pack, 20);
                do {
                        struct pack_entry base_ent;