summaryrefslogtreecommitdiff
path: root/t/t3415-rebase-autosquash.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-07-14 14:44:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-07-27 22:35:05 (GMT)
commit4e7524e012f345fe0c4eb66cb9f975da2c243c21 (patch)
treedf2eb0f1164c80fd75fa46027f3d8f8be13acd4a /t/t3415-rebase-autosquash.sh
parent5800c63717ae35286a1441f14ffff753e01f7e2b (diff)
downloadgit-4e7524e012f345fe0c4eb66cb9f975da2c243c21.zip
git-4e7524e012f345fe0c4eb66cb9f975da2c243c21.tar.gz
git-4e7524e012f345fe0c4eb66cb9f975da2c243c21.tar.bz2
t3415: verify that an empty instructionFormat is handled as before
An upcoming patch will move the todo list generation into the rebase--helper. An early version of that patch regressed on an empty rebase.instructionFormat value (the shell version could not discern between an empty one and a non-existing one, but the C version used the empty one as if that was intended to skip the oneline from the `pick <hash>` lines). Let's verify that this still works as before. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3415-rebase-autosquash.sh')
-rwxr-xr-xt/t3415-rebase-autosquash.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh
index 5848949..6d99f62 100755
--- a/t/t3415-rebase-autosquash.sh
+++ b/t/t3415-rebase-autosquash.sh
@@ -271,6 +271,18 @@ test_expect_success C_LOCALE_OUTPUT 'autosquash with custom inst format' '
test 2 = $(git cat-file commit HEAD^ | grep squash | wc -l)
'
+test_expect_success 'autosquash with empty custom instructionFormat' '
+ git reset --hard base &&
+ test_commit empty-instructionFormat-test &&
+ (
+ set_cat_todo_editor &&
+ test_must_fail git -c rebase.instructionFormat= \
+ rebase --autosquash --force -i HEAD^ >actual &&
+ git log -1 --format="pick %h %s" >expect &&
+ test_cmp expect actual
+ )
+'
+
set_backup_editor () {
write_script backup-editor.sh <<-\EOF
cp "$1" .git/backup-"$(basename "$1")"