]> Pileus Git - ~andy/git/commitdiff
Merge branch 'jc/fsck'
authorJunio C Hamano <junkio@cox.net>
Sun, 11 Mar 2007 07:10:26 +0000 (23:10 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 11 Mar 2007 07:10:26 +0000 (23:10 -0800)
* jc/fsck:
  fsck: exit with non-zero status upon errors
  unpack_sha1_file(): detect corrupt loose object files.
  fsck: fix broken loose object check.

1  2 
builtin-fsck.c
cache.h
sha1_file.c

diff --cc builtin-fsck.c
Simple merge
diff --cc cache.h
Simple merge
diff --cc sha1_file.c
index 219a10f403e0c3aa2f8d60ecde5807cf51d1a659,ac6b5e00b6dec913a39cc54e84829dc3fc6c782f..7faa8bcd507f54a55cb9e2ac685654921475f995
@@@ -1050,17 -1050,17 +1061,17 @@@ static void *unpack_sha1_file(void *map
        if (ret < Z_OK || (*type = parse_sha1_header(hdr, size)) < 0)
                return NULL;
  
-       return unpack_sha1_rest(&stream, hdr, *size);
+       return unpack_sha1_rest(&stream, hdr, *size, sha1);
  }
  
 -static unsigned long get_delta_base(struct packed_git *p,
 +static off_t get_delta_base(struct packed_git *p,
                                    struct pack_window **w_curs,
 -                                  unsigned long *curpos,
 +                                  off_t *curpos,
                                    enum object_type type,
 -                                  unsigned long delta_obj_offset)
 +                                  off_t delta_obj_offset)
  {
        unsigned char *base_info = use_pack(p, w_curs, *curpos, NULL);
 -      unsigned long base_offset;
 +      off_t base_offset;
  
        /* use_pack() assured us we have [base_info, base_info + 20)
         * as a range that we can look at without walking off the