summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-09-04 14:31:38 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-09-04 14:31:38 -0700
commit064e0b2d4ca76b0c438545a4d2170e589327e31f (patch)
tree2d751fd827c3d62a08b4cd40d9acc5a55ccee553 /t
parentGit 2.19-rc1 (diff)
parentsequencer: fix quoting in write_author_script (diff)
downloadtgif-064e0b2d4ca76b0c438545a4d2170e589327e31f.tar.xz
Merge branch 'pw/rebase-i-author-script-fix'
Recent "git rebase -i" update started to write bogusly formatted author-script, with a matching broken reading code. These are fixed. * pw/rebase-i-author-script-fix: sequencer: fix quoting in write_author_script sequencer: handle errors from read_author_ident()
Diffstat (limited to 't')
-rwxr-xr-xt/t3404-rebase-interactive.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 259c27233d..86bba5ed7c 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -1426,9 +1426,21 @@ test_expect_success 'rebase -i --gpg-sign=<key-id> overrides commit.gpgSign' '
test_expect_success 'valid author header after --root swap' '
rebase_setup_and_clean author-header no-conflict-branch &&
set_fake_editor &&
- FAKE_LINES="2 1" git rebase -i --root &&
- git cat-file commit HEAD^ >out &&
- grep "^author ..*> [0-9][0-9]* [-+][0-9][0-9][0-9][0-9]$" out
+ git commit --amend --author="Au ${SQ}thor <author@example.com>" --no-edit &&
+ git cat-file commit HEAD | grep ^author >expected &&
+ FAKE_LINES="5 1" git rebase -i --root &&
+ git cat-file commit HEAD^ | grep ^author >actual &&
+ test_cmp expected actual
+'
+
+test_expect_success 'valid author header when author contains single quote' '
+ rebase_setup_and_clean author-header no-conflict-branch &&
+ set_fake_editor &&
+ git commit --amend --author="Au ${SQ}thor <author@example.com>" --no-edit &&
+ git cat-file commit HEAD | grep ^author >expected &&
+ FAKE_LINES="2" git rebase -i HEAD~2 &&
+ git cat-file commit HEAD | grep ^author >actual &&
+ test_cmp expected actual
'
test_done