Print conflict details with the new infrastructure (bug #11181)
[stgit] / stgit / git.py
index 0955be7..4d01fc2 100644 (file)
@@ -191,6 +191,9 @@ def ls_files(files, tree = 'HEAD', full_name = True):
     return list(fileset)
 
 def parse_git_ls(output):
+    """Parse the output of git diff-index, diff-files, etc. Doesn't handle
+    rename/copy output, so don't feed it output generated with the -M
+    or -C flags."""
     t = None
     for line in output.split('\0'):
         if not line:
@@ -204,7 +207,7 @@ def parse_git_ls(output):
             t = None
 
 def tree_status(files = None, tree_id = 'HEAD', unknown = False,
-                  noexclude = True, verbose = False, diff_flags = []):
+                  noexclude = True, verbose = False):
     """Get the status of all changed files, or of a selected set of
     files. Returns a list of pairs - (status, filename).
 
@@ -249,7 +252,7 @@ def tree_status(files = None, tree_id = 'HEAD', unknown = False,
     # specified when calling the function (i.e. report all files) or
     # files were specified but already found in the previous step
     if not files or files_left:
-        args = diff_flags + [tree_id]
+        args = [tree_id]
         if files_left:
             args += ['--'] + files_left
         for t, fn in parse_git_ls(GRun('diff-index', '-z', *args).raw_output()):
@@ -265,7 +268,7 @@ def tree_status(files = None, tree_id = 'HEAD', unknown = False,
     # function (i.e. report all files) or files were specified but
     # already found in the previous step
     if not files or files_left:
-        args = list(diff_flags)
+        args = []
         if files_left:
             args += ['--'] + files_left
         for t, fn in parse_git_ls(GRun('diff-files', '-z', *args).raw_output()):
@@ -666,10 +669,6 @@ def diff(files = None, rev1 = 'HEAD', rev2 = None, diff_flags = [],
     else:
         return ''
 
-def diffstat(diff):
-    """Return the diffstat of the supplied diff."""
-    return GRun('apply', '--stat', '--summary').raw_input(diff).raw_output()
-
 def files(rev1, rev2, diff_flags = []):
     """Return the files modified between rev1 and rev2
     """