author | Junio C Hamano <gitster@pobox.com> | |
Sat, 3 Apr 2010 19:28:38 +0000 (12:28 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 3 Apr 2010 19:28:38 +0000 (12:28 -0700) |
* do/rebase-i-arbitrary:
rebase--interactive: don't require what's rebased to be a branch
Conflicts:
t/t3404-rebase-interactive.sh
rebase--interactive: don't require what's rebased to be a branch
Conflicts:
t/t3404-rebase-interactive.sh
1 | 2 | |||
---|---|---|---|---|
git-rebase--interactive.sh | patch | | diff1 | | diff2 | | blob | history |
t/t3404-rebase-interactive.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc git-rebase--interactive.sh
Simple merge
diff --cc t/t3404-rebase-interactive.sh
index 19668c2c9206c5dfe63a5992bc7d011a9cdb4083,05708c2462b1b2d90113553065bbbe3dad53cc9c..b0b43c6d329cacf24fd9ea6d69320e13d34b154c
git show HEAD~2 | grep "C changed"
'
+test_expect_success 'rebase -i 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)"
+'
+
+cat >expect <<EOF
+an earlier note
+a note
+EOF
+
+test_expect_success 'rebase -i can copy notes over a fixup' '
+ git reset --hard n3 &&
+ git notes add -m"an earlier note" n2 &&
+ GIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES="1 fixup 2" git rebase -i n1 &&
+ git notes show > output &&
+ test_cmp expect output
+'
+
+ test_expect_success 'rebase while detaching HEAD' '
+ git symbolic-ref HEAD &&
+ grandparent=$(git rev-parse HEAD~2) &&
+ test_tick &&
+ FAKE_LINES="2 1" git rebase -i HEAD~2 HEAD^0 &&
+ test $grandparent = $(git rev-parse HEAD~2) &&
+ test_must_fail git symbolic-ref HEAD
+ '
+
test_done