diff options
author | Russell Belfer <rb@github.com> | 2014-03-14 22:01:30 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-04-17 14:43:46 -0700 |
commit | 1fa17b5c92cb92a2785fba403b87525169b205c0 (patch) | |
tree | 83c8271a45339a8c51147ceffe0a7d9f4c15bb76 /src/tree-cache.h | |
parent | aba6b5edbd1d1f999086669eb8e2f553af0ac300 (diff) | |
download | libgit2-1fa17b5c92cb92a2785fba403b87525169b205c0.tar.gz |
Minor tree cache speedups
While I was looking at the conflict cleanup code, I looked over at
the tree cache code, since we clear the tree cache for each entry
that gets removed and there is some redundancy there. I made some
small tweaks to avoid extra calls to strchr and strlen in a few
circumstances.
Diffstat (limited to 'src/tree-cache.h')
-rw-r--r-- | src/tree-cache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tree-cache.h b/src/tree-cache.h index 805483a78..90c82dbbf 100644 --- a/src/tree-cache.h +++ b/src/tree-cache.h @@ -18,6 +18,7 @@ struct git_tree_cache { ssize_t entries; git_oid oid; + size_t namelen; char name[GIT_FLEX_ARRAY]; }; |