From: Junio C Hamano Date: Mon, 24 Jun 2013 20:48:40 +0000 (-0700) Subject: Merge branch 'rr/rebase-sha1-by-string-query' X-Git-Tag: v1.8.4-rc0~138 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc918acf708a839bbc350e014d599fdd458319ca;p=thirdparty%2Fgit.git Merge branch 'rr/rebase-sha1-by-string-query' Allow various commit objects to be given to "git rebase" by ':/look for this string' syntax, e.g. "git rebase --onto ':/there'". * rr/rebase-sha1-by-string-query: rebase: use peel_committish() where appropriate sh-setup: add new peel_committish() helper t/rebase: add failing tests for a peculiar revision --- bc918acf708a839bbc350e014d599fdd458319ca diff --cc t/t3400-rebase.sh index ff86725b7b,cbca71ed56..ebf93b0695 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@@ -59,6 -66,39 +59,17 @@@ test_expect_success 'rebase against mas git rebase master ' -test_expect_success 'rebase against master twice' ' - git rebase master >out && - test_i18ngrep "Current branch my-topic-branch is up to date" out -' - -test_expect_success 'rebase against master twice with --force' ' - git rebase --force-rebase master >out && - test_i18ngrep "Current branch my-topic-branch is up to date, rebase forced" out -' - -test_expect_success 'rebase against master twice from another branch' ' - git checkout my-topic-branch^ && - git rebase master my-topic-branch >out && - test_i18ngrep "Current branch my-topic-branch is up to date" out -' - -test_expect_success 'rebase fast-forward to master' ' - git checkout my-topic-branch^ && - git rebase my-topic-branch >out && - test_i18ngrep "Fast-forwarded HEAD to my-topic-branch" out -' - + test_expect_success 'rebase, with and 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 "<>") '