diff options
author | Ramkumar Ramachandra <artagnon@gmail.com> | 2013-06-14 18:47:50 +0530 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-14 09:40:30 -0700 |
commit | 6567dc05a34948b959864b12fcd59a35543273f7 (patch) | |
tree | 639ebf8ca1dc5fcc87766bdfbc7e3a0597e481f1 /t/t3400-rebase.sh | |
parent | bdff0e3a374617dce784f801b97500d9ba2e4705 (diff) | |
download | git-6567dc05a34948b959864b12fcd59a35543273f7.tar.gz |
t/rebase: add failing tests for a peculiar revision
The following commands fail, even if :/quuxery and :/foomery resolve to
perfectly valid commits:
$ git rebase [-i] --onto :/quuxery :/foomery
This is because rebase [-i] attempts to rev-parse ${REV}^0 to verify
that the given revision resolves to a commit. Add tests to document
these failures.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3400-rebase.sh')
-rwxr-xr-x | t/t3400-rebase.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index b58fa1a232..81ec517629 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -88,6 +88,17 @@ test_expect_success 'rebase fast-forward to master' ' test_i18ngrep "Fast-forwarded HEAD to my-topic-branch" out ' +test_expect_failure 'rebase, with <onto> and <upstream> specified as :/quuxery' ' + test_when_finished "git branch -D torebase" && + git checkout -b torebase my-topic-branch^ && + upstream=$(git rev-parse ":/Add B") && + onto=$(git rev-parse ":/Add A") && + git rebase --onto $onto $upstream && + git reset --hard my-topic-branch^ && + git rebase --onto ":/Add A" ":/Add B" && + git checkout my-topic-branch +' + test_expect_success 'the rebase operation should not have destroyed author information' ' ! (git log | grep "Author:" | grep "<>") ' |