packfile: remove unused member from struct pack_entry
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 2 May 2018 00:25:32 +0000 (00:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 May 2018 04:59:49 +0000 (13:59 +0900)
The sha1 member in struct pack_entry is unused except for one instance
in which we store a value in it. Since nobody ever reads this value,
don't bother to compute it and remove the member from struct pack_entry.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
packfile.c
diff --git a/cache.h b/cache.h
index 11a989319d820c5598f41c1752c369ed3779f902..dd1a9c6094dcfb512df94f1cfb4cf4d4567d1008 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -1572,7 +1572,6 @@ struct pack_window {
 
 struct pack_entry {
        off_t offset;
-       unsigned char sha1[20];
        struct packed_git *p;
 };
 
index 0bc67d0e00966008f9f8a6fa1c1b6540569a7cc0..5c219d0229f8a3faf9274201fd17463b288e084a 100644 (file)
@@ -1833,7 +1833,6 @@ static int fill_pack_entry(const unsigned char *sha1,
                return 0;
        e->offset = offset;
        e->p = p;
-       hashcpy(e->sha1, sha1);
        return 1;
 }