]> git.proxmox.com Git - libgit2.git/commit - include/git2/tree.h
Introduce a function to create a tree based on a different one
authorCarlos Martín Nieto <cmn@dwim.me>
Mon, 2 May 2016 15:36:58 +0000 (17:36 +0200)
committerCarlos Martín Nieto <cmn@dwim.me>
Tue, 17 May 2016 15:41:05 +0000 (17:41 +0200)
commit9464f9ebc1794314421353e10eeddfa8a950f7ab
treeb01f97aa81d5b0e9108bd45747f1584c96e1bacb
parentc148533024319689fca016f7c452d556265bb13f
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.
include/git2/tree.h
src/tree.c
tests/object/tree/update.c [new file with mode: 0644]