diff --git a/rhodecode/controllers/compare.py b/rhodecode/controllers/compare.py --- a/rhodecode/controllers/compare.py +++ b/rhodecode/controllers/compare.py @@ -142,7 +142,7 @@ class CompareController(BaseRepoControll 'allowed. Got %s != %s' % (org_repo, other_repo)) so, se = org_repo.run_git_command( - 'log --reverse --pretty="format: %%H" -s -p %s..%s' + 'log --reverse --pretty="format: %%H" -s %s..%s' % (org_rev, other_rev) ) changesets = [org_repo.get_changeset(cs) diff --git a/rhodecode/lib/vcs/backends/git/changeset.py b/rhodecode/lib/vcs/backends/git/changeset.py --- a/rhodecode/lib/vcs/backends/git/changeset.py +++ b/rhodecode/lib/vcs/backends/git/changeset.py @@ -294,17 +294,15 @@ class GitChangeset(BaseChangeset): f_path = safe_str(path) if limit: - cmd = 'log -n %s --pretty="format: %%H" -s -p %s -- "%s"' % ( - safe_int(limit, 0), cs_id, f_path - ) + cmd = 'log -n %s --pretty="format: %%H" -s %s -- "%s"' % ( + safe_int(limit, 0), cs_id, f_path) else: - cmd = 'log --pretty="format: %%H" -s -p %s -- "%s"' % ( - cs_id, f_path - ) + cmd = 'log --pretty="format: %%H" -s %s -- "%s"' % ( + cs_id, f_path) so, se = self.repository.run_git_command(cmd) ids = re.findall(r'[0-9a-fA-F]{40}', so) - return [self.repository.get_changeset(id) for id in ids] + return [self.repository.get_changeset(sha) for sha in ids] def get_file_history_2(self, path): """