Skip to content

Commit

Permalink
fixup! Merge pull request #964 from jeffhostetler/jeffhostetler/memih…
Browse files Browse the repository at this point in the history
…ash_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]>
  • Loading branch information
dscho authored and Git for Windows Build Agent committed Mar 30, 2017
1 parent dadc418 commit 5601864
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 22 deletions.
16 changes: 0 additions & 16 deletions cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,6 @@ struct cache_entry {
unsigned int ce_flags;
unsigned int ce_namelen;
unsigned int index; /* for link extension */
unsigned int precompute_hash_state;
unsigned int precompute_hash_name;
unsigned int precompute_hash_dir;
struct object_id oid;
char name[FLEX_ARRAY]; /* more */
};
Expand Down Expand Up @@ -232,19 +229,6 @@ struct cache_entry {
#error "CE_EXTENDED_FLAGS out of range"
#endif

/*
* Bit set if preload-index precomputed the hash value(s)
* for this cache-entry.
*/
#define CE_PRECOMPUTE_HASH_STATE__SET (1 << 0)
/*
* Bit set if precompute-index also precomputed the hash value
* for the parent directory.
*/
#define CE_PRECOMPUTE_HASH_STATE__DIR (1 << 1)

void precompute_istate_hashes(struct cache_entry *ce);

/* Forward structure decls */
struct pathspec;
struct child_process;
Expand Down
1 change: 0 additions & 1 deletion hashmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ extern unsigned int strhash(const char *buf);
extern unsigned int strihash(const char *buf);
extern unsigned int memhash(const void *buf, size_t len);
extern unsigned int memihash(const void *buf, size_t len);
extern unsigned int memihash_cont(unsigned int hash_seed, const void *buf, size_t len);

static inline unsigned int sha1hash(const unsigned char *sha1)
{
Expand Down
2 changes: 0 additions & 2 deletions preload-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ static void *preload_thread(void *_data)
struct cache_entry *ce = *cep++;
struct stat st;

precompute_istate_hashes(ce);

if (ce_stage(ce))
continue;
if (S_ISGITLINK(ce->ce_mode))
Expand Down
3 changes: 0 additions & 3 deletions read-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ void rename_index_entry_at(struct index_state *istate, int nr, const char *new_n
copy_cache_entry(new, old);
new->ce_flags &= ~CE_HASHED;
new->ce_namelen = namelen;
new->precompute_hash_state = 0;
new->index = 0;
memcpy(new->name, new_name, namelen + 1);

Expand Down Expand Up @@ -619,7 +618,6 @@ static struct cache_entry *create_alias_ce(struct index_state *istate,
new = xcalloc(1, cache_entry_size(len));
memcpy(new->name, alias->name, len);
copy_cache_entry(new, ce);
new->precompute_hash_state = 0;
save_or_free_index_entry(istate, ce);
return new;
}
Expand Down Expand Up @@ -1550,7 +1548,6 @@ static struct cache_entry *cache_entry_from_ondisk(struct ondisk_cache_entry *on
ce->ce_stat_data.sd_size = get_be32(&ondisk->size);
ce->ce_flags = flags & ~CE_NAMEMASK;
ce->ce_namelen = len;
ce->precompute_hash_state = 0;
ce->index = 0;
hashcpy(ce->oid.hash, ondisk->sha1);
memcpy(ce->name, name, len);
Expand Down

0 comments on commit 5601864

Please sign in to comment.