On 2009-03-12 12:08:56 +0000, Catalin Marinas wrote: > This is done by default, unless the --keep option is passed, for > consistency with the "pop" command. The index is checked in the > Transaction.run() function so that other commands could benefit from > this feature (off by default). > > This behaviour can be overridden by setting the stgit.autokeep option. Two small nits; otherwise, Acked-by: Karl Hasselström <kha@xxxxxxxxxxx> > - trans = transaction.StackTransaction(stack, 'goto') > + clean_iw = not options.keep and iw or None Add some parentheses here, please! I know that "and" binds tighter than "or", but I have to think for too long to remember which is which, and I'll bet I'm not alone ... > + def __assert_index_worktree_clean(self, iw): > + if not iw.worktree_clean() or \ > + not iw.index.is_clean(self.stack.head): > + self.__halt('Repository not clean. Use "refresh" or ' > + '"status --reset"') "Repository" is misleading here. Maybe something like ix_c = iw.index.is_clean(self.stack.head) wt_c = iw.worktree_clean() if not ix_c or not wt_c: self.__halt('%s not clean. Use "refresh" or "status --reset"' % { (False, True): 'Index', (True, False): 'Worktree', (False, False): 'Index and worktree' }[(ix_c, wt_c)]) -- Karl Hasselström, kha@xxxxxxxxxxx www.treskal.com/kalle -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html