lkml.org 
[lkml]   [2009]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectFix for StGIT
Date

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

\
 
 \ /
  Last update: 2009-04-10 01:29    [W:0.111 / U:2.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site