From eb2151bb8938a8e2af86e3ed34243af7b1c95786 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Fri, 12 Mar 2010 18:04:33 +0100 Subject: rebase: support automatic notes copying Luckily, all the support already happens to be there. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- t/t3400-rebase.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 't/t3400-rebase.sh') diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index 4e6a44b623..cca284004d 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -155,4 +155,21 @@ test_expect_success 'Rebase a commit that sprinkles CRs in' ' git diff --exit-code file-with-cr:CR HEAD:CR ' +test_expect_success 'rebase can copy notes' ' + git config notes.rewrite.rebase true && + git config notes.rewriteRef "refs/notes/*" && + test_commit n1 && + test_commit n2 && + test_commit n3 && + git notes add -m"a note" n3 && + git rebase --onto n1 n2 && + test "a note" = "$(git notes show HEAD)" +' + +test_expect_success 'rebase -m can copy notes' ' + git reset --hard n3 && + git rebase -m --onto n1 n2 && + test "a note" = "$(git notes show HEAD)" +' + test_done -- cgit v1.2.3