[PATCH 4/5] Keep track of safe base changes.
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
stgit/commands/common.py | 2 ++
stgit/stack.py | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/stgit/commands/common.py b/stgit/commands/common.py
index 240d003..56cb517 100644
--- a/stgit/commands/common.py
+++ b/stgit/commands/common.py
@@ -366,6 +366,8 @@ def rebase(target):
git.reset(tree_id = git_id(target))
def post_rebase(applied, nopush, merged):
+ # memorize that we rebased to here
+ crt_series._set_field('orig-base', git.get_head())
# push the patches back
if not nopush:
push_patches(applied, merged)
diff --git a/stgit/stack.py b/stgit/stack.py
index 3185d64..0f5d868 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -540,6 +540,7 @@ class Series(StgitObject):
os.makedirs(os.path.join(self._dir(), 'patches'))
os.makedirs(self.__refs_dir)
self.__begin_stack_check()
+ self._set_field('orig-base', git.get_head())
def convert(self):
"""Either convert to use a separate patch directory, or