Implement optional revert of #102 (issue #104)

This commit is contained in:
Vincent Jacques
2012-10-28 10:12:25 +01:00
parent cc6d7f1ec3
commit af98e6d1d4
6 changed files with 34 additions and 1 deletions
+4 -1
View File
@@ -660,10 +660,13 @@ class Repository(GithubObject.GithubObject):
return GitCommit.GitCommit(self._requester, data, completed=True)
def get_git_ref(self, ref):
prefix = "/git/refs/"
if not self._requester.FIX_REPO_GET_GIT_REF:
prefix = "/git/"
assert isinstance(ref, (str, unicode)), ref
headers, data = self._requester.requestAndCheck(
"GET",
self.url + "/git/refs/" + ref,
self.url + prefix + ref,
None,
None
)