chiark
/
gitweb
/
~mdw
/
stgit
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c47501f
)
Flush the HEAD cache in set_head_file()
author
Catalin Marinas
<catalin.marinas@gmail.com>
Fri, 7 Oct 2005 21:15:38 +0000
(22:15 +0100)
committer
Catalin Marinas
<catalin.marinas@gmail.com>
Fri, 7 Oct 2005 21:15:38 +0000
(22:15 +0100)
This function also changes the value read from the HEAD link but it didn't
flush the internal cached value.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/git.py
patch
|
blob
|
blame
|
history
diff --git
a/stgit/git.py
b/stgit/git.py
index de8d47f9f196a69f443648e556f76c53c3de6a77..df3adad14dea8a098e6b7ac67687ea3766c03109 100644
(file)
--- a/
stgit/git.py
+++ b/
stgit/git.py
@@
-236,6
+236,9
@@
def get_head_file():
def set_head_file(ref):
"""Resets HEAD to point to a new ref
"""
+ # head cache flushing is needed since we might have a different value
+ # in the new head
+ __clear_head_cache()
if __run('git-symbolic-ref HEAD', [ref]) != 0:
raise GitException, 'Could not set head to "%s"' % ref