git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] t3404: restore specialized rebase-editor following commentchar test

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Aug 12, 2013, 04:07 UTC
Message-ID
<1376280459-55188-2-git-send-email-sunshine@sunshineco.com>
In-Reply-To
<1376280459-55188-1-git-send-email-sunshine@sunshineco.com>

At start of script, t3404 installs a specialized test-editor ($EDITOR) upon which many of the interactive rebase tests depend. Late in t3404, test "rebase -i respects core.commentchar" installs its own custom editor but neglects to restore the specialized editor when finished. This oversight will cause later tests, which require the specialized editor, to fail. (There are no such tests presently, but a subsequent patch will introduce one.) Fix this problem.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 t/t3404-rebase-interactive.sh | 1 +
 1 file changed, 1 insertion(+)
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 49ccb38..af141be 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -949,6 +949,7 @@ test_expect_success 'rebase -i respects core.commentchar' '
 	sed -e "2,\$s/^/\\\\/" "$1" >"$1.tmp" &&
 	mv "$1.tmp" "$1"
 	EOF
+	test_when_finished "set_fake_editor" &&
 	test_set_editor "$(pwd)/remove-all-but-first.sh" &&
 	git rebase -i B &&
 	test B = $(git cat-file commit HEAD^ | sed -ne \$p)
-- 
1.8.4.rc2.460.ga591f4a
Previous: Eric SunshineNext: Junio C Hamano
Message 2 of 8 in “fix interactive rebase short SHA-1 collision bug”
  1. 0/3 fix interactive rebase short SHA-1 collision bugEric Sunshine, Aug 12, 2013
  2. 1/3 t3404: restore specialized rebase-editor following commentchar testEric Sunshine, Aug 12, 2013
  3. Junio C HamanoAug 12, 2013
  4. Eric SunshineAug 12, 2013
  5. 2/3 t3404: rebase: interactive: demonstrate short SHA-1 collisionEric Sunshine, Aug 12, 2013
  6. Junio C HamanoAug 12, 2013
  7. Eric SunshineAug 12, 2013
  8. 3/3 rebase: interactive: fix short SHA-1 collisionEric Sunshine, Aug 12, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.