[PATCH v2 8/9] t3415: test fixup with wrapped oneline
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 25, 2017, 13:52 UTC
- Message-ID
- <669be37bd417294913596a1d47e046b03eb23f6d.1493128210.git.johannes.schindelin@gmx.de>
- In-Reply-To
- <cover.1493128210.git.johannes.schindelin@gmx.de>
The `git commit --fixup` command unwraps wrapped onelines when constructing the commit message, without wrapping the result.
We need to make sure that `git rebase --autosquash` keeps handling such cases correctly, in particular since we are about to move the autosquash handling into the rebase--helper.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- t/t3415-rebase-autosquash.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh index 48346f1cc0c..9fd629a6e21 100755 --- a/t/t3415-rebase-autosquash.sh +++ b/t/t3415-rebase-autosquash.sh @@ -304,4 +304,18 @@ test_expect_success 'extra spaces after fixup!' ' test $base = $parent ' +test_expect_success 'wrapped original subject' ' + if test -d .git/rebase-merge; then git rebase --abort; fi && + base=$(git rev-parse HEAD) && + echo "wrapped subject" >wrapped && + git add wrapped && + test_tick && + git commit --allow-empty -m "$(printf "To\nfixup")" && + test_tick && + git commit --allow-empty -m "fixup! To fixup" && + git rebase -i --autosquash --keep-empty HEAD~2 && + parent=$(git rev-parse HEAD^) && + test $base = $parent +' + test_done
-- 2.12.2.windows.2.406.gd14a8f8640f