From 7ec9c4fb813918b37546c009bd9127f977ed8917 Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Tue, 4 Oct 2016 15:46:18 +0200 Subject: remote: unfix fetch-infos paring of 8a2f7dce4(pydev fixes) + Mark another TC failing when not in master. --- git/remote.py | 4 ++-- git/test/test_repo.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/git/remote.py b/git/remote.py index d35e1fad..5d31a442 100644 --- a/git/remote.py +++ b/git/remote.py @@ -625,8 +625,8 @@ class Remote(LazyMixin, Iterable): for pline in progress_handler(line): # END handle special messages for cmd in cmds: - if len(pline) > 1 and pline[0] == ' ' and pline[1] == cmd: - fetch_info_lines.append(pline) + if len(line) > 1 and line[0] == ' ' and line[1] == cmd: + fetch_info_lines.append(line) continue # end find command code # end for each comand code we know diff --git a/git/test/test_repo.py b/git/test/test_repo.py index 1d537e93..a889b2ff 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -909,6 +909,9 @@ class TestRepo(TestBase): rw_master = self.rorepo.clone(join_path_native(rw_dir, 'master_repo')) rw_master.git.checkout('HEAD~10') worktree_path = join_path_native(rw_dir, 'worktree_repo') - rw_master.git.worktree('add', worktree_path, 'master') + try: + rw_master.git.worktree('add', worktree_path, 'master') + except Exception as ex: + raise AssertionError(ex, "It's ok if TC not running from `master`.") self.failUnlessRaises(InvalidGitRepositoryError, Repo, worktree_path) -- cgit v1.2.1