Thread (19 messages) flat view 19 messages, 3 authors, 2016-06-15

Re: [StGit PATCH 1/5] Check for local changes with "goto"

From: Karl Hasselström <hidden>
Date: 2016-06-15 22:46:24

On 2009-03-17 10:51:08 +0000, Catalin Marinas wrote:
2009/3/17 Karl Hasselström [off-list ref]:
quoted
On 2009-03-16 14:56:11 +0000, Catalin Marinas wrote:
quoted
if not iw.worktree_clean():
    self.__halt('Worktree not clean. Use "refresh" or "status --reset"')
if not iw.index.is_clean(self.stack.head):
    self.__halt('Index not clean. Use "refresh" or "status --reset"')
[...]
quoted
Your version doesn't generate the "Your index and worktree are
both dirty" warning, but I guess that's OK.
The iw.worktree_clean() only checks whether the worktree is clean
relative to the index (I just tried "git update-index --refresh"
after "git add <modified file>" and it returns 0).
Yes, I know. The point I was trying to make was that your code doesn't
make a difference between

  (iw.worktree_clean(), iw.index.is_clean(self.stack.head)) == (False, True)

and

  (iw.worktree_clean(), iw.index.is_clean(self.stack.head)) == (False, False)

But as I said, it's not really important.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help