diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-22 23:31:26 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-22 23:31:26 +0200 |
commit | b7a5c05875a760c0bf83af6617c68061bda6cfc5 (patch) | |
tree | cf2090d419ff714b4e1293523cf1568bc2331855 /lib/git/refs.py | |
parent | 58e2157ad3aa9d75ef4abb90eb2d1f01fba0ba2b (diff) | |
download | gitpython-b7a5c05875a760c0bf83af6617c68061bda6cfc5.tar.gz |
Adjusted tests to deal with API changes
Diffstat (limited to 'lib/git/refs.py')
-rw-r--r-- | lib/git/refs.py | 7 |
1 files changed, 3 insertions, 4 deletions
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): |