Messages in this thread Patch in this message | | | From | David Howells <> | Subject | Fix for StGIT | Date | Fri, 10 Apr 2009 00:24:41 +0100 |
| |
Hi Catalin,
I think StGIT needs something like the attached patch to get it to generate patches with renames in them correctly. This isn't quite right, since it doesn't pass the file list to git-diff-tree, but I can't work out how to make the python do it:-/
David --- diff -c /usr/lib/python2.5/site-packages/stgit/git.py.old /usr/lib/python2.5/site-packages/stgit/git.py --- /usr/lib/python2.5/site-packages/stgit/git.py.old 2008-06-08 23:26:03.000000000 +0100 +++ /usr/lib/python2.5/site-packages/stgit/git.py 2009-04-10 00:17:58.000000000 +0100 @@ -820,8 +820,8 @@ # usually invoke git.diff() form the calling functions def diffstat(files = None, rev1 = 'HEAD', rev2 = None): """Return the diffstat between rev1 and rev2.""" - return GRun('apply', '--stat', '--summary' - ).raw_input(diff(files, rev1, rev2)).raw_output() + return GRun('diff-tree', '-M', '--stat', '--summary', rev1, rev2 + ).raw_output() def files(rev1, rev2, diff_flags = []): """Return the files modified between rev1 and rev2
| |