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

[PATCH 2/2] Test "stg rebase" after "stg commit"

From
Yann Dirson <ydirson@altern.org>
Date
Jun 3, 2007, 13:41 UTC
Message-ID
<20070603134157.1681.70969.stgit@gandelf.nowhere.earth>
In-Reply-To
<20070603133006.1681.1742.stgit@gandelf.nowhere.earth>
Two new tests for "stg rebase":
  1. Try to rebase to a commit that is ahead of HEAD. This should
     work, and does.
  2. Try to commit a patch, and then rebase. This doesn't work,
     because "stg rebase" aborts if orig-base != base, and "stg
     commit" doesn't update orig-base. (It does work if "stg rebase"
     is given the --force flag.)
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
---
 t/t2200-rebase.sh |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/t/t2200-rebase.sh b/t/t2200-rebase.sh
index 52462dd..b48e513 100755
--- a/t/t2200-rebase.sh
+++ b/t/t2200-rebase.sh
@@ -30,4 +30,20 @@ test_expect_success \
 	test `stg id base@stack` = `git rev-parse master~1`
 	'
 
+test_expect_success \
+	'Rebase to next commit' \
+	'
+	stg rebase master &&
+	test $(stg id base@stack) = $(git rev-parse master)
+	'
+
+test_expect_success \
+	'Commit the patch and rebase again' \
+	'
+	stg commit &&
+	git tag committed-here &&
+	stg rebase master &&
+	test $(stg id base@stack) = $(git rev-parse master)
+	'
+
 test_done
Previous: David KågedalNext: Catalin Marinas
Message 4 of 5 in “Fixing the rebase safeguard”
  1. 0/2 Fixing the rebase safeguardYann Dirson, Jun 3, 2007
  2. 1/2 Changed rebasing safety check to look for reachability of stack base (gna bug #9181).Yann Dirson, Jun 3, 2007
  3. David KågedalJun 4, 2007
  4. 2/2 Test "stg rebase" after "stg commit"Yann Dirson, Jun 3, 2007
  5. Catalin MarinasJun 4, 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.