summaryrefslogtreecommitdiff
path: root/refs/head.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-11-23 22:47:34 +0100
committerSebastian Thiel <byronimo@gmail.com>2010-11-23 22:47:34 +0100
commit61f3db7bd07ac2f3c2ff54615c13bf9219289932 (patch)
tree3074927bc62c3b4e1473d24e787836d0dfb3fa21 /refs/head.py
parenta21a9f6f13861ddc65671b278e93cf0984adaa30 (diff)
downloadgitpython-61f3db7bd07ac2f3c2ff54615c13bf9219289932.tar.gz
Removed ORIG_HEAD handling which was downright wrong. ORIG_HEAD gets only set during merge and rebase, and probably everything that changes the ref more drastically. Probably I have to reread that. What needs to be adjusted though is the reflog
Diffstat (limited to 'refs/head.py')
-rw-r--r--refs/head.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/refs/head.py b/refs/head.py
index 278cecc7..08ad581d 100644
--- a/refs/head.py
+++ b/refs/head.py
@@ -29,23 +29,6 @@ class HEAD(SymbolicReference):
to contain the previous value of HEAD"""
return SymbolicReference(self.repo, self._ORIG_HEAD_NAME)
- def _set_reference(self, ref):
- """If someone changes the reference through us, we must manually update
- the ORIG_HEAD if we are detached. The underlying implementation can only
- handle un-detached heads as it has to check whether the current head
- is the checked-out one"""
- if self.is_detached:
- prev_commit = self.commit
- super(HEAD, self)._set_reference(ref)
- SymbolicReference.create(self.repo, self._ORIG_HEAD_NAME, prev_commit, force=True)
- else:
- super(HEAD, self)._set_reference(ref)
- # END handle detached mode
-
- # aliased reference
- reference = property(SymbolicReference._get_reference, _set_reference, doc="Returns the Reference we point to")
- ref = reference
-
def reset(self, commit='HEAD', index=True, working_tree = False,
paths=None, **kwargs):
"""Reset our HEAD to the given commit optionally synchronizing