Skip to content

Commit e834c96

Browse files
committed
fixup! Merge pull request #964 from jeffhostetler/jeffhostetler/memihash_perf
I should really implement special-handling for a new drop! prefix to commit messages... This commit reverts that Pull Request, in preparation for merging in a new iteration of that work (which looks substantially different from the previous iteration...). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ea4fe1b commit e834c96

File tree

4 files changed

+0
-22
lines changed

4 files changed

+0
-22
lines changed

cache.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,6 @@ struct cache_entry {
177177
unsigned int ce_flags;
178178
unsigned int ce_namelen;
179179
unsigned int index; /* for link extension */
180-
unsigned int precompute_hash_state;
181-
unsigned int precompute_hash_name;
182-
unsigned int precompute_hash_dir;
183180
struct object_id oid;
184181
char name[FLEX_ARRAY]; /* more */
185182
};
@@ -236,19 +233,6 @@ struct cache_entry {
236233
#error "CE_EXTENDED_FLAGS out of range"
237234
#endif
238235

239-
/*
240-
* Bit set if preload-index precomputed the hash value(s)
241-
* for this cache-entry.
242-
*/
243-
#define CE_PRECOMPUTE_HASH_STATE__SET (1 << 0)
244-
/*
245-
* Bit set if precompute-index also precomputed the hash value
246-
* for the parent directory.
247-
*/
248-
#define CE_PRECOMPUTE_HASH_STATE__DIR (1 << 1)
249-
250-
void precompute_istate_hashes(struct cache_entry *ce);
251-
252236
/* Forward structure decls */
253237
struct pathspec;
254238
struct child_process;

hashmap.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ extern unsigned int strhash(const char *buf);
1212
extern unsigned int strihash(const char *buf);
1313
extern unsigned int memhash(const void *buf, size_t len);
1414
extern unsigned int memihash(const void *buf, size_t len);
15-
extern unsigned int memihash_cont(unsigned int hash_seed, const void *buf, size_t len);
1615

1716
static inline unsigned int sha1hash(const unsigned char *sha1)
1817
{

preload-index.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ static void *preload_thread(void *_data)
4646
struct cache_entry *ce = *cep++;
4747
struct stat st;
4848

49-
precompute_istate_hashes(ce);
50-
5149
if (ce_stage(ce))
5250
continue;
5351
if (S_ISGITLINK(ce->ce_mode))

read-cache.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ void rename_index_entry_at(struct index_state *istate, int nr, const char *new_n
7777
copy_cache_entry(new, old);
7878
new->ce_flags &= ~CE_HASHED;
7979
new->ce_namelen = namelen;
80-
new->precompute_hash_state = 0;
8180
new->index = 0;
8281
memcpy(new->name, new_name, namelen + 1);
8382

@@ -619,7 +618,6 @@ static struct cache_entry *create_alias_ce(struct index_state *istate,
619618
new = xcalloc(1, cache_entry_size(len));
620619
memcpy(new->name, alias->name, len);
621620
copy_cache_entry(new, ce);
622-
new->precompute_hash_state = 0;
623621
save_or_free_index_entry(istate, ce);
624622
return new;
625623
}
@@ -1562,7 +1560,6 @@ static struct cache_entry *cache_entry_from_ondisk(struct ondisk_cache_entry *on
15621560
ce->ce_stat_data.sd_size = get_be32(&ondisk->size);
15631561
ce->ce_flags = flags & ~CE_NAMEMASK;
15641562
ce->ce_namelen = len;
1565-
ce->precompute_hash_state = 0;
15661563
ce->index = 0;
15671564
hashcpy(ce->oid.hash, ondisk->sha1);
15681565
memcpy(ce->name, name, len);

0 commit comments

Comments
 (0)