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

Re: [PATCH] t7407: Fix recursive submodule test

From
Jens Lehmann <jens.lehmann@web.de>
Date
Oct 26, 2012, 19:29 UTC
Message-ID
<508AE4AB.4070209@web.de>
In-Reply-To
<1351278834-28867-1-git-send-email-hordp@cisco.com>
Am 26.10.2012 21:13, schrieb Phil Hord:
Show 13 quoted lines
> A test in t7404-submodule-foreach purports to test that
> the --cached flag is properly noticed by --recursive calls
> to the foreach command as it descends into nested
> submodules.  However, the test really does not perform this
> test since the change it looks for is in a top-level
> submodule handled by the first invocation of the command.
> To properly test for the flag being passed to recursive
> invocations, the change must be buried deeper in the
> hierarchy.
> 
> Move the change one level deeper so it properly verifies
> the recursive machinery of the 'git submodule status'
> command.
Me thinks we should definitely do this.
Show 27 quoted lines
> Signed-off-by: Phil Hord <hordp@cisco.com>
> ---
>  t/t7407-submodule-foreach.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh
> index 9b69fe2..107b4b7 100755
> --- a/t/t7407-submodule-foreach.sh
> +++ b/t/t7407-submodule-foreach.sh
> @@ -226,14 +226,14 @@ test_expect_success 'test "status --recursive"' '
>  	test_cmp expect actual
>  '
>  
> -sed -e "/nested1 /s/.*/+$nested1sha1 nested1 (file2~1)/;/sub[1-3]/d" < expect > expect2
> +sed -e "/nested2 /s/.*/+$nested2sha1 nested1\/nested2 (file2~1)/;/sub[1-3]/d" < expect > expect2
>  mv -f expect2 expect
>  
>  test_expect_success 'ensure "status --cached --recursive" preserves the --cached flag' '
>  	(
>  		cd clone3 &&
>  		(
> -			cd nested1 &&
> +			cd nested1/nested2 &&
>  			test_commit file2
>  		) &&
>  		git submodule status --cached --recursive -- nested1 > ../actual
> 
Previous: Phil HordNext: Jens Lehmann
Message 5 of 12 in “submodule status: properly pass options with --recursive”
  1. submodule status: properly pass options with --recursiveJens Lehmann, Oct 25, 2012
  2. Jeff KingOct 26, 2012
  3. Phil HordOct 26, 2012
  4. t7407: Fix recursive submodule testPhil Hord, Oct 26, 2012
  5. Jens LehmannOct 26, 2012
  6. submodule status: remove unused orig_* variablesJens Lehmann, Oct 28, 2012
  7. Jeff KingOct 29, 2012
  8. Jens LehmannOct 26, 2012
  9. 0/2 Teach --recursive to submodule syncPhil Hord, Oct 26, 2012
  10. 1/2 Teach --recursive to submodule syncPhil Hord, Oct 26, 2012
  11. 2/2 Add tests for submodule sync --recursivePhil Hord, Oct 26, 2012
  12. Jens LehmannOct 28, 2012

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.