From 24eede728321fce4f73d812f3af2a35f679c2f9e Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Fri, 7 Oct 2005 22:15:38 +0100 Subject: [PATCH] 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 --- stgit/git.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.11.0