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

[PATCH 2/4] test: remove a porcelain test that hard-codes commit names

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 7, 2011, 14:49 UTC
Message-ID
<20111207144929.GC30157@elie.hsd1.il.comcast.net>
In-Reply-To
<20111207144217.GA30157@elie.hsd1.il.comcast.net>

The rev-list output in this test depends on the details of test_tick's dummy dates and the choice of hash function. Worse, it depends on the order and nature of commits made in the earlier tests, so adding new tests or rearranging existing ones breaks it.

It would be nice to check that "git commit" and commit-tree name objects consistently and that commit objects' text is as documented, but this particular test checks everything at once and hence is not a robust test for that. Remove it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Hence the odd hunk in the previous patch.

Maybe this doesn't belong in this series, but it's the kind of thing that drives me batty when writing new tests.

 t/t7501-commit.sh |   20 --------------------
 1 files changed, 0 insertions(+), 20 deletions(-)
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index da75abc1..9c507b08 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -144,10 +144,6 @@ test_expect_success PERL \
 	git diff >diff2 &&
 	test_cmp diff1 diff2"
 
-test_expect_success \
-	"showing committed revisions" \
-	"git rev-list HEAD >current"
-
 cat >editor <<\EOF
 #!/bin/sh
 sed -e "s/good/bad/g" < "$1" > "$1-"
@@ -168,22 +164,6 @@ test_expect_success \
 	 echo "Another good message." | EDITOR=./editor git commit -a -F - &&
 	 git show -s --pretty=format:"%s" | grep -q good
 	 '
-# We could just check the head sha1, but checking each commit makes it
-# easier to isolate bugs.
-
-cat >expected <<\EOF
-285fcf7ec0d61b14249dfdb4c1e1fe03eaf15ee0
-0b8148b9afce917b87d71199b900466dc8ea8b6e
-43fb8826314939ce79a856face7953557fdca3d1
-eaa04bc3ae0f0b003f7f1d86bf869ec5d73eaf3e
-ee1963b250ee0f02a3fe37be0e4a02bb5af6a1ad
-b49f306003c627361a0304d151a6b4c8b26af6a1
-402702b49136e7587daa9280e91e4bb7cb2179f7
-EOF
-
-test_expect_success \
-    'validate git rev-list output.' \
-    'test_cmp expected current'
 
 test_expect_success 'partial commit that involves removal (1)' '
 
-- 
1.7.8.rc3
Previous: Jeff KingNext: Jonathan Nieder
Message 16 of 27 in “Query on git commit amend”
  1. Viresh KumarDec 6, 2011
  2. Konstantin KhomoutovDec 6, 2011
  3. Dirk SüsserottDec 6, 2011
  4. Johannes SixtDec 6, 2011
  5. Viresh KumarDec 6, 2011
  6. Viresh KumarDec 6, 2011
  7. Vijay LakshminarayananDec 6, 2011
  8. Jeff KingDec 6, 2011
  9. Vijay LakshminarayananDec 7, 2011
  10. Junio C HamanoDec 6, 2011
  11. Junio C HamanoDec 6, 2011
  12. 0/4 Re: commit: honor --no-editJonathan Nieder, Dec 7, 2011
  13. 1/4 test: add missing "&&" after echo commandJonathan Nieder, Dec 7, 2011
  14. Jeff KingDec 7, 2011
  15. Jeff KingDec 7, 2011
  16. 2/4 test: remove a porcelain test that hard-codes commit namesJonathan Nieder, Dec 7, 2011
  17. 3/4 t7501 (commit): modernize styleJonathan Nieder, Dec 7, 2011
  18. 4/4 test: commit --amend should honor --no-editJonathan Nieder, Dec 7, 2011
  19. Vijay LakshminarayananDec 7, 2011
  20. Viresh KumarDec 7, 2011
  21. Björn SteinbrinkDec 7, 2011
  22. Viresh KumarDec 7, 2011
  23. Vijay LakshminarayananDec 7, 2011
  24. Junio C HamanoDec 8, 2011
  25. Viresh KumarDec 9, 2011
  26. Viresh KumarDec 8, 2011
  27. Viresh KumarDec 8, 2011

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.