X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=t%2Ft3400-rebase.sh;h=dbf7dfba9b55e906d44a35d7b11ca2ceaad7e6f5;hb=6a1b3fc78311f16834d885e4e0baead8e51ed631;hp=4314ad2d66d06b411e4bc0c9ee7b07553fc35ac2;hpb=fe7e37235dd9b36402afeccb24bbced933e847d7;p=git.git diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index 4314ad2d6..dbf7dfba9 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -151,4 +151,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