diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 4e6a44b623c456dc85f9daa6c4b5b1f0789c93c5..cca284004dca93921094d40648f04931a320f169 100755 (executable)
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
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