cache-tree: introduce write_index_as_tree()
commitd23a5117f821b91e1d72745238a4c085a089864e
authorPaul Tan <pyokagan@gmail.com>
Tue, 4 Aug 2015 13:51:40 +0000 (4 21:51 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Aug 2015 05:02:11 +0000 (4 22:02 -0700)
treea5b8200766404d04913f1bce008b80174dbf4d5b
parenteb898b83f2417b99f290459884f6ea8d2db2bd4d
cache-tree: introduce write_index_as_tree()

A caller may wish to write a temporary index as a tree. However,
write_cache_as_tree() assumes that the index was read from, and will
write to, the default index file path. Introduce write_index_as_tree()
which removes this limitation by allowing the caller to specify its own
index_state and index file path.

Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache-tree.c
cache-tree.h