git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t3400 (rebase): add failing test for a peculiar rev spec
@ 2013-04-18  8:52 Ramkumar Ramachandra
  2013-04-18 16:39 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Ramkumar Ramachandra @ 2013-04-18  8:52 UTC (permalink / raw)
  To: Git List; +Cc: Junio C Hamano

'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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-04-19 17:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18  8:52 [PATCH] t3400 (rebase): add failing test for a peculiar rev spec Ramkumar Ramachandra
2013-04-18 16:39 ` 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

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).