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

[PATCH 1/2] t7406: correct depth test in shallow test

From
Stefan Beller <sbeller@google.com>
Date
Jul 28, 2016, 17:26 UTC
Message-ID
<20160728172641.8376-2-sbeller@google.com>
In-Reply-To
<20160728172641.8376-1-sbeller@google.com>

We used to ask for 3 changes and tested for having 1, so the test seems broken.

Correct the test by using test_line_count that exists in the test suite.
Signed-off-by: Stefan Beller <sbeller@google.com>
---
 t/t7406-submodule-update.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index 88e9750..bd261ac 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -846,9 +846,10 @@ test_expect_success 'submodule update clone shallow submodule' '
 	(cd super3 &&
 	 sed -e "s#url = ../#url = file://$pwd/#" <.gitmodules >.gitmodules.tmp &&
 	 mv -f .gitmodules.tmp .gitmodules &&
-	 git submodule update --init --depth=3
+	 git submodule update --init --depth=2
 	 (cd submodule &&
-	  test 1 = $(git log --oneline | wc -l)
+	  git log --oneline >lines
+	  test_line_count = 2 lines
 	 )
 )
 '
-- 
2.9.2.466.g8c6d1f9.dirty
Previous: Stefan BellerNext: Junio C Hamano
Message 2 of 11 in “submodule update: allow '.' for branch value”
  1. 0/2 submodule update: allow '.' for branch valueStefan Beller, Jul 28, 2016
  2. 1/2 t7406: correct depth test in shallow testStefan Beller, Jul 28, 2016
  3. Junio C HamanoJul 28, 2016
  4. Stefan BellerJul 28, 2016
  5. Stefan BellerJul 28, 2016
  6. Junio C HamanoJul 28, 2016
  7. 2/2 submodule update: allow '.' for branch valueStefan Beller, Jul 28, 2016
  8. 2/2 submodule update: allow '.' for branch valueStefan Beller, Jul 28, 2016
  9. Junio C HamanoJul 28, 2016
  10. Stefan BellerJul 28, 2016
  11. Junio C HamanoJul 28, 2016

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.