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

[PATCH v2 1/2] t/t7509: remove unnecessary manipulation of reflog

From
David Turner <dturner@twopensource.com>
Date
Jul 27, 2015, 22:57 UTC
Message-ID
<1438037829-2642-1-git-send-email-dturner@twopensource.com>

Remove unnecessary reflog manipulation. The test does not rely in any way on this reflog manipulation, and the case that the test exercises is unrelated to reflogs.

Signed-off-by: David Turner <dturner@twopensource.com>
---
This version of the patch series addresses Junio's comments on v1.
---
 t/t7509-commit.sh | 13 -------------
 1 file changed, 13 deletions(-)
diff --git a/t/t7509-commit.sh b/t/t7509-commit.sh
index 9ac7940..db9774e 100755
--- a/t/t7509-commit.sh
+++ b/t/t7509-commit.sh
@@ -90,22 +90,10 @@ sha1_file() {
 remove_object() {
 	rm -f $(sha1_file "$*")
 }
-no_reflog() {
-	cp .git/config .git/config.saved &&
-	echo "[core] logallrefupdates = false" >>.git/config &&
-	test_when_finished "mv -f .git/config.saved .git/config" &&
-
-	if test -e .git/logs
-	then
-		mv .git/logs . &&
-		test_when_finished "mv logs .git/"
-	fi
-}
 
 test_expect_success '--amend option with empty author' '
 	git cat-file commit Initial >tmp &&
 	sed "s/author [^<]* </author  </" tmp >empty-author &&
-	no_reflog &&
 	sha=$(git hash-object -t commit -w empty-author) &&
 	test_when_finished "remove_object $sha" &&
 	git checkout $sha &&
@@ -119,7 +107,6 @@ test_expect_success '--amend option with empty author' '
 test_expect_success '--amend option with missing author' '
 	git cat-file commit Initial >tmp &&
 	sed "s/author [^<]* </author </" tmp >malformed &&
-	no_reflog &&
 	sha=$(git hash-object -t commit -w malformed) &&
 	test_when_finished "remove_object $sha" &&
 	git checkout $sha &&
-- 
2.0.4.315.gad8727a-twtrsrc
Next: David Turner
Message 1 of 2 in “t/t7509: remove unnecessary manipulation of reflog”
  1. 1/2 t/t7509: remove unnecessary manipulation of reflogDavid Turner, Jul 27, 2015
  2. 2/2 tests: Remove some direct access to .git/logsDavid Turner, Jul 27, 2015

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.