You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/10/02 18:29:51 UTC
[7/7] git commit: [#5775] Minor change to ensure git process doesn't
do any extra work in the background
[#5775] Minor change to ensure git process doesn't do any extra work in the background
Signed-off-by: Cory Johns <cj...@slashdotmedia.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/4c1f101a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4c1f101a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4c1f101a
Branch: refs/heads/master
Commit: 4c1f101ad028f5018d6aed31feabc7c0df5626f9
Parents: 4478bf3
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Oct 2 16:29:01 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Wed Oct 2 16:29:01 2013 +0000
----------------------------------------------------------------------
ForgeGit/forgegit/model/git_repo.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4c1f101a/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index b1c621b..3efc519 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -314,9 +314,8 @@ class GitImplementation(M.RepositoryImplementation):
if renamed and renamed['to'] == path:
rename_details['path'] = '/' + renamed['from']
# get first rev **before** rename
- _iter = self._git.iter_commits(revs, renamed['from'])
- prev_rev = next(_iter)
- prev_rev = next(_iter)
+ _iter = self._git.iter_commits(revs, renamed['from'], max_count=2)
+ prev_rev = list(_iter)[1]
rename_details['commit_url'] = self._repo.url_for_commit(
prev_rev.hexsha
)