diff options
author | Thomas Gummerer <t.gummerer@gmail.com> | 2012-07-06 18:07:30 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-07-08 19:49:34 -0700 |
commit | 68c4f6a57759233ef4586f27d424721c6c1c0ea7 (patch) | |
tree | a746d0dfbae4352f1351e2ce2e4d1b255b9e519d /read-cache.c | |
parent | 8228a23b35f6bd34a87d4d839d06e7c18ae9e750 (diff) | |
download | git-68c4f6a57759233ef4586f27d424721c6c1c0ea7.tar.gz |
Replace strlen() with ce_namelen()
Replace strlen(ce->name) with ce_namelen() in a couple
of places which gives us some additional bits of
performance.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c index ef355cc9a8..1df6adf0bf 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1119,7 +1119,7 @@ int refresh_index(struct index_state *istate, unsigned int flags, const char **p continue; if (pathspec && - !match_pathspec(pathspec, ce->name, strlen(ce->name), 0, seen)) + !match_pathspec(pathspec, ce->name, ce_namelen(ce), 0, seen)) filtered = 1; if (ce_stage(ce)) { @@ -1841,7 +1841,7 @@ int read_index_unmerged(struct index_state *istate) if (!ce_stage(ce)) continue; unmerged = 1; - len = strlen(ce->name); + len = ce_namelen(ce); size = cache_entry_size(len); new_ce = xcalloc(1, size); memcpy(new_ce->name, ce->name, len); |