3 test_description
='messages from rebase operation'
14 test_expect_success setup
'
31 Already applied
: 0001 A
32 Already applied
: 0002 B
36 test_expect_success
'rebase -m' '
38 git rebase -m master >report &&
39 sed -n -e "/^Already applied: /p" \
40 -e "/^Committed: /p" report >actual &&
41 test_cmp expect actual
45 test_expect_success
'rebase --stat' '
46 git reset --hard start &&
47 git rebase --stat master >diffstat.txt &&
48 grep "^ fileX | *1 +$" diffstat.txt
51 test_expect_success
'rebase w/config rebase.stat' '
52 git reset --hard start &&
53 git config rebase.stat true &&
54 git rebase master >diffstat.txt &&
55 grep "^ fileX | *1 +$" diffstat.txt
58 test_expect_success
'rebase -n overrides config rebase.stat config' '
59 git reset --hard start &&
60 git config rebase.stat true &&
61 git rebase -n master >diffstat.txt &&
62 ! grep "^ fileX | *1 +$" diffstat.txt
67 # "Does not point to a valid commit: invalid-ref"
69 # NEEDSWORK: This "grep" is fine in real non-C locales, but
70 # GETTEXT_POISON poisons the refname along with the enclosing
72 test_expect_success
'rebase --onto outputs the invalid ref' '
73 test_must_fail git rebase --onto invalid-ref HEAD HEAD 2>err &&
74 test_i18ngrep "invalid-ref" err