From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org, Yann Dirson <ydirson@altern.org>
Subject: [StGIT PATCH] Test "stg rebase" after "stg commit"
Date: Fri, 04 May 2007 10:13:21 +0200 [thread overview]
Message-ID: <20070504081021.14786.77675.stgit@yoghurt> (raw)
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>
---
(2) shows a bug in "stg rebase"'s safety logic. I'm not sure how to
fix it, because I don't know how it's supposed to work in the first
place. (An obvious fix would be to update it whenever the base
changes, but that'll take some work, and I'm not convinced it can't be
done with les work. Yes, I'm lazy.) Yann, could you explain?
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
next reply other threads:[~2007-05-04 8:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-04 8:13 Karl Hasselström [this message]
2007-05-06 12:21 ` [StGIT PATCH] Test "stg rebase" after "stg commit" Karl Hasselström
2007-05-06 13:15 ` Yann Dirson
2007-05-06 13:39 ` Yann Dirson
2007-05-06 14:22 ` Karl Hasselström
2007-06-02 19:04 ` Yann Dirson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070504081021.14786.77675.stgit@yoghurt \
--to=kha@treskal.com \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
--cc=ydirson@altern.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).