]> git.proxmox.com Git - libgit2.git/commitdiff
Drop parsing pack filename SHA1 part, no one cares the filename
authorLinquize <linquize@yahoo.com.hk>
Thu, 23 Jan 2014 15:28:28 +0000 (23:28 +0800)
committerLinquize <linquize@yahoo.com.hk>
Thu, 23 Jan 2014 15:28:28 +0000 (23:28 +0800)
src/pack.c
src/pack.h

index 23fcf35300b1ba214992d5510f2fc0c8f396ab35..de038a45c1b6a12718faa61ff603ea55b15fde2a 100644 (file)
@@ -997,11 +997,6 @@ int git_packfile_alloc(struct git_pack_file **pack_out, const char *path)
                return -1;
        }
 
-       /* see if we can parse the sha1 oid in the packfile name */
-       if (path_len < 40 ||
-               git_oid_fromstr(&p->sha1, path + path_len - GIT_OID_HEXSZ) < 0)
-               memset(&p->sha1, 0x0, GIT_OID_RAWSZ);
-
        *pack_out = p;
 
        return 0;
index 28146ab30dcd826334a4ec13807fedfc2ddd75fc..58f81e2f0e6399f3c561d4476ac28838e529da3e 100644 (file)
@@ -88,7 +88,6 @@ struct git_pack_file {
        int index_version;
        git_time_t mtime;
        unsigned pack_local:1, pack_keep:1, has_cache:1;
-       git_oid sha1;
        git_oidmap *idx_cache;
        git_oid **oids;