Description of problem: I setup a private pagure instance on my CentOS server. After importing my projects, I noticed that some of the commits where not showing the diffs and after talking to pagure devs on IRC I decided to investigate further. After trying the code by hand on a python shell, I was able to reproduce the problem with no issues at all and eveytime. Version-Release number of selected component (if applicable): 0.24.2 How reproducible: Everytime Steps to Reproduce: You can totally use my repo for testing. - git clone https://code.r3pek.org/r3pek/Pharmacies.git - cd Pharmacies - python2 >>> from pygit2 import Repository >>> repo = Repository(".") >>> obj = repo.get("c26c5411a206bc87cc7a4f5b8303b6e9af951b72") >>> obj.parent_ids #Just to confirm they're there [3eb85cf73301596254d9ea4b55dfe720727c6985] >>> diff = repo.diff(obj.parents[0],obj) >>> diff.patch Actual results: None Expected results: The actual diff patch Additional info: I tested the same thing on my dev box running Archlinux and pygit2 version 0.25.1 and it works.
In [1]: from pygit2 import Repository In [2]: repo = Repository(".") In [3]: obj = repo.get("c26c5411a206bc87cc7a4f5b8303b6e9af951b72") In [4]: obj.parent_ids #Just to confirm they're there Out[4]: [3eb85cf73301596254d9ea4b55dfe720727c6985] In [5]: diff = repo.diff(obj.parents[0],obj) In [6]: diff.patch Out[6]: 'diff --git a/src/org/r3pek/pharmacies/PharmacyInfo.java b/src/org/r3pek/pharmacies/PharmacyInfo.java\nindex cef96af..658d28e 100644\n--- a/src/org/r3pek/pharmacies/PharmacyInfo.java\n+++ b/src/org/r3pek/pharmacies/PharmacyInfo.java\n@@ -1,7 +1,5 @@\n package org.r3pek.pharmacies;\r\n \r\n-import com.admob.android.ads.AdView;\r\n-\r\n import org.r3pek.pharmacies.utils.GeoUtils;\r\n import org.r3pek.pharmacies.utils.GlobalVars;\r\n import org.r3pek.pharmacies.widgets.Arrow;\r\n@@ -75,8 +73,6 @@ public class PharmacyInfo extends Activity {\n \tpublic void onPause() {\r\n \t\tarrowChangerSensor.delImage((Arrow)findViewById(R.id.ivInfoDirection));\r\n \tsm.unregisterListener(arrowChangerSensor);\r\n- \tAdView ad = (AdView) findViewById(R.id.ad);\r\n- \tad.cleanup();\r\n \tsuper.onPause();\r\n \t}\r\n \t\r\n' Works here on Fedora (not EPEL).
repoquery -i python-pygit2 Name : python-pygit2 Version : 0.24.2 Release : 1.el7 Architecture: x86_64 Size : 681821 Packager : Fedora Project Group : Unspecified URL : http://www.pygit2.org Repository : epel Summary : Python 2.x bindings for libgit2 Source : python-pygit2-0.24.2-1.el7.src.rpm Description : pygit2 is a set of Python bindings to the libgit2 library, which implements the core of Git. Maybe this is specific for the EPEL version?
Just an additional info, it has the same behaviour on pagure.io: https://pagure.io/Pharmacies/c/c26c5411a206bc87cc7a4f5b8303b6e9af951b72?branch=master
pygit2 stack is outdated on EL7, so most likely...
python-pygit2-0.26.4-1.el7 libgit2-0.26.3-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-5ae7f0e7c7
libgit2-0.26.3-1.el7, python-pygit2-0.26.4-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-5ae7f0e7c7
libgit2-0.26.3-1.el7, python-pygit2-0.26.4-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.