Commit Graph

3 Commits

Author SHA1 Message Date
Carlos Martín Nieto
5341230536 tree: plug leaks in the tree updater 2016-05-19 15:29:53 +02:00
Carlos Martín Nieto
922496562b tree: use testrepo2 for the tree updater tests
This gives us trees with subdirectories, which the new test needs.
2016-05-19 15:21:26 +02:00
Carlos Martín Nieto
9464f9ebc1 Introduce a function to create a tree based on a different one
Instead of going through the usual steps of reading a tree recursively
into an index, modifying it and writing it back out as a tree, introduce
a function to perform simple updates more efficiently.

`git_tree_create_updated` avoids reading trees which are not modified
and supports upsert and delete operations. It is not as versatile as
modifying the index, but it makes some common operations much more
efficient.
2016-05-17 17:41:05 +02:00