From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Git List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] t3400 (rebase): add failing test for a peculiar rev spec
Date: Thu, 18 Apr 2013 14:22:35 +0530 [thread overview]
Message-ID: <1366275155-26244-1-git-send-email-artagnon@gmail.com> (raw)
'git rebase' does not recognize revisions specified as :/text. This
is because the attempts to rev-parse ${REV}^0, which fails in this
case. Add a test to document this failure.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
Okay, so I'm not sure what the right fix for this is.
- The :/text syntax seems to be broken in the first place, as it
can't be combined with ^ or @. I'd like to be able to say
{:/bardery}^1, or even {:/foomery}^{/communist mule}. Why
shouldn't I be allowed to do this?
- The failure occurs in git-rebase.sh:403. Is it using the ^0 only
to make sure that the revision specified is a commit? Surely,
there'a a better way to do this?
Can someone point me in the right direction?
t/t3400-rebase.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index f6cc102..42ca1e0 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -88,6 +88,14 @@ test_expect_success 'rebase fast-forward to master' '
test_i18ngrep "Fast-forwarded HEAD to my-topic-branch" out
'
+test_expect_failure 'rebase against revision specified as :/text' '
+ git checkout my-topic-branch^ &&
+ sha1=$(git rev-parse ":/Add B") &&
+ git rebase $sha1 &&
+ git checkout my-topic-branch^ &&
+ git rebase ":/Add B"
+'
+
test_expect_success 'the rebase operation should not have destroyed author information' '
! (git log | grep "Author:" | grep "<>")
'
--
1.8.2.1.423.g4fb5c0a.dirty
next reply other threads:[~2013-04-18 8:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-18 8:52 Ramkumar Ramachandra [this message]
2013-04-18 16:39 ` [PATCH] t3400 (rebase): add failing test for a peculiar rev spec Junio C Hamano
2013-04-19 7:43 ` Ramkumar Ramachandra
2013-04-19 16:21 ` Junio C Hamano
2013-04-19 17:28 ` Junio C Hamano
2013-04-19 17:53 ` Junio C Hamano
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=1366275155-26244-1-git-send-email-artagnon@gmail.com \
--to=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).