Thread (45 messages) 45 messages, 2 authors, 2018-05-02

[PATCH v2 04/42] packfile: remove unused member from struct pack_entry

flat view
STALE3082d

From: brian m. carlson <hidden>
Date: 2018-05-02 00:28:21
Subsystem: the rest · Maintainer: Linus Torvalds

Revision v2 of 2 in this series.

Revisions (2)
  1. v1 [diff vs current]
  2. v2 current
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 <redacted>
---
 cache.h    | 1 -
 packfile.c | 1 -
 2 files changed, 2 deletions(-)
diff --git a/cache.h b/cache.h
index be9fab43ec..37d3f0104b 100644
--- 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;
 };
 
diff --git a/packfile.c b/packfile.c
index 0bc67d0e00..5c219d0229 100644
--- a/packfile.c
+++ b/packfile.c
@@ -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;
 }
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help