summaryrefslogtreecommitdiff
path: root/split-index.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2015-03-08 17:12:32 +0700
committerJunio C Hamano <gitster@pobox.com>2015-03-12 13:45:16 -0700
commitbe0d9d532326a81d761913e3ec9e2e7c62eeca7b (patch)
tree520de59deed0808f4d7c40658480519dd50e6302 /split-index.c
parent27b099ae8742f014700edba92036db288750e44a (diff)
downloadgit-be0d9d532326a81d761913e3ec9e2e7c62eeca7b.tar.gz
ewah: add convenient wrapper ewah_serialize_strbuf()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 21485e2066..968b780a06 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;
}