Empty tree can also be null
Submitted by Sindhu S
Link to original bug (#702412)
Description
Created attachment 246981 Fix for trees can also be NULL
"You can pass NULL to indicate an empty tree, although it is an error to pass NULL for both the old_tree and new_tree." [1]
The code in libgit2-glib/ggit-diff.c indicated that
g_return_val_if_fail (GGIT_IS_TREE (old_tree), NULL);
g_return_val_if_fail (GGIT_IS_TREE (new_tree), NULL);
...trees should not be NULL hence the bug 702259
[1] http://libgit2.github.com/libgit2/#HEAD/group/diff/git_diff_tree_to_tree
Patch attached.
Patch 246981, "Fix for trees can also be NULL":
0001-Fix-for-trees-can-also-be-NULL.patch
Version: git master
Resolution: RESOLVED FIXED