I use libgit2 in C++ project for my custom objects store.
I use git_tree_create_updated function from libgit2 for updating trees.
There is a problem for me to do both move and update operation for some tree in one commit. If i remove old tree in old place, and after this add new tree to another place, of course it looks like deleting one tree and adding another tree in the git history.
If i try to add old tree to new place first, afterward to update old tree in new place with new tree, and afterward delete old tree in old place, libgit2 returns error about duplicate entrys in update list(for git_tree_create_updated function). It happens because i use two operations on one entry, but is there another method to ask libgit2 use rename with update?
I know, git provides rename/update operation in one commit, but how can i do the same using libgit2, especially with git_tree_create_updated function?
About duplicating: As i use libgit2, i hope there is a possibility to customize getting diff procedure.