From 06957db1edede59a25bb2126fda7bc70fded42f3 Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Tue, 8 Mar 2016 14:02:26 -0500 Subject: [PATCH] Use diff long options and uncap GitPython GitPython had a very incompatible change that breaks any call that uses a single character option (e.g., -U) that requires no space between the option and the value. So far, this breaks the diff API where we used the -U option instead of the long option equivalent. For history: https://github.com/gitpython-developers/GitPython/issues/382 So far, I've only seen one place where this bites gertty. Since the GitPython author has stated this will not be reverted or fixed, having a permanent cap on that library seems harsh as we won't get any other bug fixes. This fixes the known/found areas where we are affected. Change-Id: Iadb279234af2ea01fbff35dc629c01dae5a3195c --- gertty/gitrepo.py | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gertty/gitrepo.py b/gertty/gitrepo.py index 8587fe7..9028c86 100644 --- a/gertty/gitrepo.py +++ b/gertty/gitrepo.py @@ -388,7 +388,7 @@ class Repo(object): extra_contexts.append(CommitContext(None, newc)) contexts = itertools.chain( extra_contexts, oldc.diff( - newc, color='never',create_patch=True, U=context)) + newc, color='never', create_patch=True, unified=context)) for diff_context in contexts: # Each iteration of this is a file f = DiffFile() diff --git a/requirements.txt b/requirements.txt index b07b170..848f6fc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ pbr>=0.11,<2.0 urwid>=1.2.1,!=1.3.0 SQLAlchemy>=1.0.4 -GitPython>=0.3.7,<1.0.2 +GitPython>=0.3.7 python-dateutil requests>=2.5.3,<3.0.0 ordereddict