From: Catalin Marinas Date: Tue, 17 Jul 2007 23:01:22 +0000 (+0100) Subject: Modify the assertion in Series.new_patch X-Git-Tag: v0.13~6 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/501d024430ebad7e010362cc60f73713da6e787e Modify the assertion in Series.new_patch The bottom == head assertion is wrong when the patch is created as unapplied. Signed-off-by: Catalin Marinas --- diff --git a/stgit/stack.py b/stgit/stack.py index 7ffaf75..dbd7ea4 100644 --- a/stgit/stack.py +++ b/stgit/stack.py @@ -881,7 +881,7 @@ class Series(PatchSet): if commit: # create a commit for the patch (may be empty if top == bottom); # only commit on top of the current branch - assert(commit and bottom == head) + assert(unapplied or bottom == head) top_commit = git.get_commit(top) commit_id = git.commit(message = descr, parents = [bottom], cache_update = False,