git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/5] Keep track of safe base changes.

From
Yann Dirson <ydirson@altern.org>
Date
Feb 20, 2007, 00:14 UTC
Message-ID
<20070220001418.31139.49033.stgit@gandelf.nowhere.earth>
In-Reply-To
<20070220000908.31139.36841.stgit@gandelf.nowhere.earth>
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
Previous: Yann DirsonNext: Yann Dirson
Message 5 of 7 in “stgit rebasing fixes”
  1. 0/5 stgit rebasing fixesYann Dirson, Feb 20, 2007
  2. 1/5 Factorize rebasing behaviour.Yann Dirson, Feb 20, 2007
  3. 2/5 Move stack-base querying into Series class.Yann Dirson, Feb 20, 2007
  4. 3/5 Various cleanups for clarity.Yann Dirson, Feb 20, 2007
  5. 4/5 Keep track of safe base changes.Yann Dirson, Feb 20, 2007
  6. 5/5 Refuse to pull/rebase when rendered unsafe by (un)commits.Yann Dirson, Feb 20, 2007
  7. stgit "push --merged" woesYann Dirson, Feb 28, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.