Fix for StGIT

From: David Howells
Date: Thu Apr 09 2009 - 19:26:33 EST



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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/