Public bug reported:

Steps to reproduce:

git clone https://git.launchpad.net/~racb/+git/pygit2-tree-compare-bug
cd pygit2-tree-compare-bug
python3
import pygit2
r = pygit2.Repository('.')
tag1 = r.get('12f94a0b8488844522310b9eda9cbf183e24d7ab')
tag2 = r.get('bee50a71086cf4ae8f74fe9f0690404caf280d5e')
len(r.diff(tag1, tag2))

Expected result: non-zero
Actual result: zero (0)

This differs from reality. "git diff
12f94a0b8488844522310b9eda9cbf183e24d7ab
bee50a71086cf4ae8f74fe9f0690404caf280d5e" does produce results. If I
peel the Tag objects to Tree objects, these present the same (different)
ids as <hash>^{tree} on the git command line. If I fetch the tree
objects by their hashes directly using r.get(), the problem does not
appear to occur.

I'm using python3-pygit2 0.24.0-0ubuntu2 on Ubuntu 16.04.

** Affects: python-pygit2 (Ubuntu)
     Importance: High
         Status: Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1695049

Title:
  In some cases pygit2.Repository.diff() returns no difference between
  trees that are actually different

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-pygit2/+bug/1695049/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to