summaryrefslogtreecommitdiff
path: root/git/test/test_remote.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-22 16:28:29 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-22 16:28:29 +0100
commit5ad07f7b23e762e3eb99ce45020375d2bd743fc5 (patch)
tree08ad8249d4f59c7579fd6458d7b51aafc9c094e6 /git/test/test_remote.py
parent2ce3fe7cef8910aadc2a2b39a3dab4242a751380 (diff)
parent1410bcc76725b50be794b385006dedd96bebf0fb (diff)
downloadgitpython-5ad07f7b23e762e3eb99ce45020375d2bd743fc5.tar.gz
Merge branch 'master' into teeberg-master
Need latest master to proceed with test Conflicts: doc/source/tutorial.rst
Diffstat (limited to 'git/test/test_remote.py')
-rw-r--r--git/test/test_remote.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/git/test/test_remote.py b/git/test/test_remote.py
index bf2f76a8..98d74d8b 100644
--- a/git/test/test_remote.py
+++ b/git/test/test_remote.py
@@ -7,7 +7,8 @@
from git.test.lib import (
TestBase,
with_rw_repo,
- with_rw_and_rw_remote_repo
+ with_rw_and_rw_remote_repo,
+ fixture
)
from git import (
RemoteProgress,
@@ -520,3 +521,16 @@ class TestRemote(TestBase):
assert type(fi.ref) is Reference
assert fi.ref.path == "refs/something/branch"
+
+ def test_uncommon_branch_names(self):
+ stderr_lines = fixture('uncommon_branch_prefix_stderr').decode('ascii').splitlines()
+ fetch_lines = fixture('uncommon_branch_prefix_FETCH_HEAD').decode('ascii').splitlines()
+
+ # The contents of the files above must be fetched with a custom refspec:
+ # +refs/pull/*:refs/heads/pull/*
+ res = [FetchInfo._from_line('ShouldntMatterRepo', stderr, fetch_line)
+ for stderr, fetch_line in zip(stderr_lines, fetch_lines)]
+ assert len(res)
+ assert res[0].remote_ref_path == 'refs/pull/1/head'
+ assert res[0].ref.path == 'refs/heads/pull/1/head'
+ assert isinstance(res[0].ref, Head)