X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/63fda3e18e0091a8643a79b350618f25708cb30e..2b4b9c29d1bc5d98eafdfdc82b99b57ebd4298d0:/stgit/git.py diff --git a/stgit/git.py b/stgit/git.py index 582e803..016bc3a 100644 --- a/stgit/git.py +++ b/stgit/git.py @@ -308,7 +308,7 @@ def switch_branch(name): if not branch_exists(new_head): raise GitException, 'Branch "%s" does not exist' % name - tree_id = rev_parse(new_head + '^0') + tree_id = rev_parse(new_head + '^{commit}') if tree_id != get_head(): refresh_index() if __run('git-read-tree -u -m', [get_head(), tree_id]) != 0: