From 06212b942dcb2ed071a3b899997f1cff55008a9b Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Tue, 22 Nov 2011 22:56:54 -0800 Subject: [PATCH] gitcmds: Replace changed_files() calls with diff_filenames() Consolidate the "get me a list of the files that changed" functions. Signed-off-by: David Aguilar --- cola/controllers/compare.py | 2 +- cola/gitcmds.py | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/cola/controllers/compare.py b/cola/controllers/compare.py index f5f95c90..b27cb271 100644 --- a/cola/controllers/compare.py +++ b/cola/controllers/compare.py @@ -310,7 +310,7 @@ class CompareController(QObserver): # get the changed files list start = self.model.revision_start end = self.model.revision_end - files = gitcmds.changed_files(start, end) + files = gitcmds.diff_filenames(start, end) # get the old name of any renamed files, and prune them # from the changes list diff --git a/cola/gitcmds.py b/cola/gitcmds.py index e9f2ac59..8e71a065 100644 --- a/cola/gitcmds.py +++ b/cola/gitcmds.py @@ -530,13 +530,6 @@ def renamed_files(start, end, git=git): for r in difflines if r.startswith('rename from ')] -def changed_files(start, end, git=git): - zfiles_str = git.diff('%s..%s' % (start, end), - name_only=True, z=True, - **_common_diff_opts()).strip('\0') - return [core.decode(enc) for enc in zfiles_str.split('\0') if enc] - - def parse_ls_tree(rev): """Return a list of(mode, type, sha1, path) tuples.""" lines = git.ls_tree(rev, r=True).splitlines() -- 2.11.4.GIT