Fix diff crash on perm-only changes

The update to GitPython that supports easily detecting the filenames
in file-permissions-only changes merged a year ago.  Start using it
and raise the mininum GitPython version to one which supports it.

Change-Id: I9a5104a4b399dee0d9e029fd0b10e37b8aafd3f8
changes/76/281476/1
James E. Blair 7 years ago
parent 75b0be437e
commit b33cbc0a7a

@ -392,14 +392,8 @@ class Repo(object):
for diff_context in contexts:
# Each iteration of this is a file
f = DiffFile()
if diff_context.a_blob:
f.oldname = diff_context.a_blob.path
if diff_context.b_blob:
f.newname = diff_context.b_blob.path
# TODO(jeblair): if/when https://github.com/gitpython-developers/GitPython/pull/266 merges,
# remove above 4 lines and replace with these two:
# f.oldname = diff_context.a_path
# f.newname = diff_context.b_path
f.oldname = diff_context.a_path
f.newname = diff_context.b_path
if diff_context.new_file:
f.oldname = 'Empty file'
f.old_empty = True

@ -2,7 +2,7 @@ pbr>=0.11,<2.0
urwid>=1.2.1,!=1.3.0
SQLAlchemy>=1.0.4
GitPython>=0.3.2.RC1,<1.0.2
GitPython>=0.3.7,<1.0.2
python-dateutil
requests>=2.5.3,<3.0.0
ordereddict

Loading…
Cancel
Save