From: Catalin Marinas Date: Fri, 7 Oct 2005 21:15:38 +0000 (+0100) Subject: Flush the HEAD cache in set_head_file() X-Git-Tag: v0.8~60 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/24eede728321fce4f73d812f3af2a35f679c2f9e Flush the HEAD cache in set_head_file() 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 --- diff --git a/stgit/git.py b/stgit/git.py index de8d47f..df3adad 100644 --- 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