Skip to content

Commit c51c394

Browse files
bk2204gitster
authored andcommitted
packfile: remove unused member from struct pack_entry
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>
1 parent 6f13fd0 commit c51c394

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

cache.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1572,7 +1572,6 @@ struct pack_window {
15721572

15731573
struct pack_entry {
15741574
off_t offset;
1575-
unsigned char sha1[20];
15761575
struct packed_git *p;
15771576
};
15781577

packfile.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1833,7 +1833,6 @@ static int fill_pack_entry(const unsigned char *sha1,
18331833
return 0;
18341834
e->offset = offset;
18351835
e->p = p;
1836-
hashcpy(e->sha1, sha1);
18371836
return 1;
18381837
}
18391838

0 commit comments

Comments
 (0)