Create a diff between a tree and the working directory.
The tree you provide will be used for the "old_file" side of the delta,
and the working directory will be used for the "new_file" side.
This is not the same as git diff <treeish> or `git diff-index
<treeish>`. Those commands use information from the index, whereas this
function strictly returns the differences between the tree and the files
in the working directory, regardless of the state of the index. Use
git_diff_tree_to_workdir_with_index to emulate those commands.
To see difference between this and git_diff_tree_to_workdir_with_index,
consider the example of a staged file deletion where the file has then
been put back into the working dir and further modified. The
tree-to-workdir diff for that file is 'modified', but git diff would
show status 'deleted' since there is a staged delete.
@param diff A pointer to a git_diff pointer that will be allocated.
@param repo The repository containing the tree.
@param old_tree A git_tree object to diff from, or null for empty tree.
@param opts Structure with options to influence diff or null for defaults.
Create a diff between a tree and the working directory.
The tree you provide will be used for the "old_file" side of the delta, and the working directory will be used for the "new_file" side.
This is not the same as git diff <treeish> or `git diff-index <treeish>`. Those commands use information from the index, whereas this function strictly returns the differences between the tree and the files in the working directory, regardless of the state of the index. Use git_diff_tree_to_workdir_with_index to emulate those commands.
To see difference between this and git_diff_tree_to_workdir_with_index, consider the example of a staged file deletion where the file has then been put back into the working dir and further modified. The tree-to-workdir diff for that file is 'modified', but git diff would show status 'deleted' since there is a staged delete.
@param diff A pointer to a git_diff pointer that will be allocated. @param repo The repository containing the tree. @param old_tree A git_tree object to diff from, or null for empty tree. @param opts Structure with options to influence diff or null for defaults.