diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2012-08-08 00:24:26 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruen@linbit.com> | 2012-08-08 13:39:19 +0200 |
commit | 9a37354cc6e56a18e297087a861ee7435e7fb9c6 (patch) | |
tree | 6ad4b2b83f2503eefed4e866e362cbf7404fde17 | |
parent | a18960d31e798d3424b81581a88a6934b4a45d2f (diff) | |
download | patch-9a37354cc6e56a18e297087a861ee7435e7fb9c6.tar.gz |
Remove SHA1 hashes from the file id cache
* src/util.c (file_id): Remove sha1 field.
(update_sha1, lookup_sha1): Remove functions.
* src/util.h (update_sha1, lookup_sha1): Remove declarations.
-rw-r--r-- | src/util.c | 22 | ||||
-rw-r--r-- | src/util.h | 2 |
2 files changed, 0 insertions, 24 deletions
@@ -59,7 +59,6 @@ typedef struct ino_t ino; enum file_id_type type; bool queued_output; - char *sha1; } file_id; /* Return an index for ENTRY into a hash table of size TABLE_SIZE. */ @@ -106,7 +105,6 @@ __insert_file_id (struct stat const *st, enum file_id_type type) next_slot->dev = st->st_dev; next_slot->ino = st->st_ino; next_slot->queued_output = false; - next_slot->sha1 = 0; p = hash_insert (file_id_table, next_slot); if (!p) xalloc_die (); @@ -164,26 +162,6 @@ has_queued_output (struct stat const *st) return p && p->queued_output; } -void -update_sha1 (struct stat const *st, char const *sha1) -{ - file_id *p = __lookup_file_id (st); - - if (! p) - p = __insert_file_id (st, UNKNOWN); - else - free (p->sha1); - p->sha1 = sha1 ? xstrdup (sha1) : 0; -} - -char const * -lookup_sha1 (struct stat const *st) -{ - file_id *p = __lookup_file_id (st); - - return p ? p->sha1 : NULL; -} - static bool _GL_ATTRIBUTE_PURE contains_slash (const char *s) { @@ -68,8 +68,6 @@ void insert_file_id (struct stat const *, enum file_id_type); enum file_id_type lookup_file_id (struct stat const *); void set_queued_output (struct stat const *, bool); bool has_queued_output (struct stat const *); -void update_sha1(struct stat const *, char const *); -char const *lookup_sha1 (struct stat const *); enum file_attributes { FA_TIMES = 1, |