git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Philip Oakley <philipoakley@iee.org>, Jeff King <peff@peff.net>,
	Phillip Wood <phillip.wood@dunelm.org.uk>,
	Liam Beguin <liambeguin@gmail.com>
Subject: [PATCH v6 01/10] t3415: verify that an empty instructionFormat is handled as before
Date: Fri, 14 Jul 2017 16:44:38 +0200 (CEST)	[thread overview]
Message-ID: <52e711346eba2fca30225da1d4f42cb17f7ee08b.1500043437.git.johannes.schindelin@gmx.de> (raw)
In-Reply-To: <cover.1500043436.git.johannes.schindelin@gmx.de>

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>
---
 t/t3415-rebase-autosquash.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh
index 5848949ec37..6d99f624b62 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")"
-- 
2.13.3.windows.1.13.gaf0c2223da0



  reply	other threads:[~2017-07-14 14:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14 14:44 [PATCH v6 00/10] The final building block for a faster rebase -i Johannes Schindelin
2017-07-14 14:44 ` Johannes Schindelin [this message]
2017-07-14 14:44 ` [PATCH v6 02/10] rebase -i: generate the script via rebase--helper Johannes Schindelin
2017-07-14 22:50   ` Stefan Beller
2017-07-15 12:56     ` Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 03/10] rebase -i: remove useless indentation Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 04/10] rebase -i: do not invent onelines when expanding/collapsing SHA-1s Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 05/10] rebase -i: also expand/collapse the SHA-1s via the rebase--helper Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 06/10] t3404: relax rebase.missingCommitsCheck tests Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 07/10] rebase -i: check for missing commits in the rebase--helper Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 08/10] rebase -i: skip unnecessary picks using " Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 09/10] t3415: test fixup with wrapped oneline Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 10/10] rebase -i: rearrange fixup/squash lines using the rebase--helper Johannes Schindelin
2017-07-14 17:27 ` [PATCH v6 00/10] The final building block for a faster rebase -i Stefan Beller
2017-07-14 20:39   ` Johannes Schindelin
2017-07-20 21:38 ` Junio C Hamano
2017-07-22 11:44   ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52e711346eba2fca30225da1d4f42cb17f7ee08b.1500043437.git.johannes.schindelin@gmx.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=liambeguin@gmail.com \
    --cc=peff@peff.net \
    --cc=philipoakley@iee.org \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).