sequencer: notify user of --update-refs activity
commit4611884ea883908a9638cafbd824c401c41cf7f6
authorDerrick Stolee <derrickstolee@github.com>
Tue, 19 Jul 2022 18:33:44 +0000 (19 18:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Jul 2022 19:49:04 +0000 (19 12:49 -0700)
tree4a95f482077afa3f43481c84c2023b8cff924d03
parentaa37f3e1d892698276b52f347c6374499f6c0759
sequencer: notify user of --update-refs activity

When the user runs 'git rebase -i --update-refs', the end message still
says only

  Successfully rebased and updated <HEAD-ref>.

Update the sequencer to collect the successful (and unsuccessful) ref
updates due to the --update-refs option, so the end message now says

  Successfully rebased and updated <HEAD-ref>.
  Updated the following refs with --update-refs:
refs/heads/first
refs/heads/third
  Failed to update the following refs with --update-refs:
refs/heads/second

To test this output, we need to be very careful to format the expected
error to drop the leading tab characters. Also, we need to be aware that
the verbose output from 'git rebase' is writing progress lines which
don't use traditional newlines but clear the line after every progress
item is complete. When opening the error file in an editor, these lines
are visible, but when looking at the diff in a terminal those lines
disappear because of the characters that delete the previous characters.
Use 'sed' to clear those progress lines and clear the tabs so we can get
an exact match on our expected output.

Reported-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
t/t3404-rebase-interactive.sh