chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Teach the new infrastructure about the index and worktree
[stgit]
/
stgit
/
lib
/
stack.py
diff --git
a/stgit/lib/stack.py
b/stgit/lib/stack.py
index 0e821d9b03641d6758e1ec891a0de8ff4c3542a6..9d47d68e642e8464b5c408ddcc2959f5f3b4ecc5 100644
(file)
--- a/
stgit/lib/stack.py
+++ b/
stgit/lib/stack.py
@@
-70,8
+70,7
@@
class Patch(object):
def is_applied(self):
return self.name in self.__stack.patchorder.applied
def is_empty(self):
def is_applied(self):
return self.name in self.__stack.patchorder.applied
def is_empty(self):
- c = self.commit
- return c.data.tree == c.data.parent.data.tree
+ return self.commit.data.is_nochange()
class PatchOrder(object):
"""Keeps track of patch order, and which patches are applied.
class PatchOrder(object):
"""Keeps track of patch order, and which patches are applied.
@@
-155,6
+154,10
@@
class Stack(object):
).commit.data.parent
else:
return self.head
).commit.data.parent
else:
return self.head
+ def head_top_equal(self):
+ if not self.patchorder.applied:
+ return True
+ return self.head == self.patches.get(self.patchorder.applied[-1]).commit
class Repository(git.Repository):
def __init__(self, *args, **kwargs):
class Repository(git.Repository):
def __init__(self, *args, **kwargs):