aboutsummaryrefslogtreecommitdiff
path: root/split-index.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-26 13:24:45 -0700
committerJunio C Hamano <gitster@pobox.com>2015-05-26 13:24:46 -0700
commit38ccaf93bbf5a99dbff908068292ffaa5bafe25e (patch)
treecd1b379e0ebd26c6b5576e023c67338c41462d4e /split-index.c
parenta26d48a46e8d7df58e7a91e7aac6795e29ddbd6d (diff)
parentaeb6f8b3a2bbfd8b48a967139fbf4581e5345182 (diff)
downloadgit-38ccaf93bbf5a99dbff908068292ffaa5bafe25e.tar.gz
git-38ccaf93bbf5a99dbff908068292ffaa5bafe25e.tar.xz
Merge branch 'nd/untracked-cache'
Teach the index to optionally remember already seen untracked files to speed up "git status" in a working tree with tons of cruft. * nd/untracked-cache: (24 commits) git-status.txt: advertisement for untracked cache untracked cache: guard and disable on system changes mingw32: add uname() t7063: tests for untracked cache update-index: test the system before enabling untracked cache update-index: manually enable or disable untracked cache status: enable untracked cache untracked-cache: temporarily disable with $GIT_DISABLE_UNTRACKED_CACHE untracked cache: mark index dirty if untracked cache is updated untracked cache: print stats with $GIT_TRACE_UNTRACKED_STATS untracked cache: avoid racy timestamps read-cache.c: split racy stat test to a separate function untracked cache: invalidate at index addition or removal untracked cache: load from UNTR index extension untracked cache: save to an index extension ewah: add convenient wrapper ewah_serialize_strbuf() untracked cache: don't open non-existent .gitignore untracked cache: mark what dirs should be recursed/saved untracked cache: record/validate dir mtime and reuse cached output untracked cache: make a wrapper around {open,read,close}dir() ...
Diffstat (limited to 'split-index.c')
-rw-r--r--split-index.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/split-index.c b/split-index.c
index 21485e206..968b780a0 100644
--- a/split-index.c
+++ b/split-index.c
@@ -41,13 +41,6 @@ int read_link_extension(struct index_state *istate,
return 0;
}
-static int write_strbuf(void *user_data, const void *data, size_t len)
-{
- struct strbuf *sb = user_data;
- strbuf_add(sb, data, len);
- return len;
-}
-
int write_link_extension(struct strbuf *sb,
struct index_state *istate)
{
@@ -55,8 +48,8 @@ int write_link_extension(struct strbuf *sb,
strbuf_add(sb, si->base_sha1, 20);
if (!si->delete_bitmap && !si->replace_bitmap)
return 0;
- ewah_serialize_to(si->delete_bitmap, write_strbuf, sb);
- ewah_serialize_to(si->replace_bitmap, write_strbuf, sb);
+ ewah_serialize_strbuf(si->delete_bitmap, sb);
+ ewah_serialize_strbuf(si->replace_bitmap, sb);
return 0;
}