From b7a5c05875a760c0bf83af6617c68061bda6cfc5 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 22 Oct 2009 23:31:26 +0200 Subject: Adjusted tests to deal with API changes --- lib/git/refs.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/git/refs.py') diff --git a/lib/git/refs.py b/lib/git/refs.py index 97d0a6eb..aeee0da1 100644 --- a/lib/git/refs.py +++ b/lib/git/refs.py @@ -222,7 +222,7 @@ class SymbolicReference(object): """ fp = open(os.path.join(self.repo.path, self.name), 'r') try: - tokens = fp.readline().split(' ') + tokens = fp.readline().rstrip().split(' ') if tokens[0] != 'ref:': raise TypeError("%s is a detached symbolic reference as it points to %r" % tokens[0]) return Reference.from_path(self.repo, tokens[1]) @@ -298,10 +298,9 @@ class HEAD(SymbolicReference): raise ValueError( "Cannot reset the working tree if the index is not reset as well") # END working tree handling - repo.git.reset(mode, commit, paths, **kwargs) + self.repo.git.reset(mode, commit, paths, **kwargs) - # we always point to the active branch as it is the one changing - self + return self class Head(Reference): -- cgit v1.2.1