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

Re: [PATCH 2/2] Add optional parameters to the diff option "--ignore-submodules"

From
BCBrandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
Date
Jun 24, 2010, 14:23 UTC
Message-ID
<oyrgMnuxMzyEmKMa6Bb_rvLb_zp8WscXW73T03xzJ5_bpheAt9Hpcw@cipher.nrlssc.navy.mil>
In-Reply-To
<4C0E7077.9090509@web.de>
On 06/08/2010 11:31 AM, Jens Lehmann wrote:
Two things...
Show 12 quoted lines
> diff --git a/t/t4027-diff-submodule.sh b/t/t4027-diff-submodule.sh
> index 83c1914..559b41e 100755
> --- a/t/t4027-diff-submodule.sh
> +++ b/t/t4027-diff-submodule.sh
> @@ -103,9 +103,17 @@ test_expect_success 'git diff HEAD with dirty submodule (work tree, refs match)'
>  	git diff HEAD >actual &&
>  	sed -e "1,/^@@/d" actual >actual.body &&
>  	expect_from_to >expect.body $subprev $subprev-dirty &&
> -	test_cmp expect.body actual.body
> +	test_cmp expect.body actual.body &&
> +	git diff --ignore-submodules HEAD >actual2 &&
> +	echo -n "" | test_cmp - actual2 &&

'echo -n' is not portable (here, and below). Please use printf instead. Ditto for t4041

Show 9 quoted lines
> +	git diff --ignore-submodules=untracked HEAD >actual3 &&
> +	sed -e "1,/^@@/d" actual3 >actual3.body &&
> +	expect_from_to >expect.body $subprev $subprev-dirty &&
> +	test_cmp expect.body actual3.body &&
> +	git diff --ignore-submodules=dirty HEAD >actual4 &&
> +	echo -n "" | test_cmp - actual4
>  '
> -
> +test_done
   ^^^^^^^^^

Why is this test_done here? There are additional tests after this point, and an additional call to test_done.

Show 22 quoted lines
>  test_expect_success 'git diff HEAD with dirty submodule (index, refs match)' '
>  	(
>  		cd sub &&
> @@ -129,7 +137,13 @@ test_expect_success 'git diff HEAD with dirty submodule (untracked, refs match)'
>  	git diff HEAD >actual &&
>  	sed -e "1,/^@@/d" actual >actual.body &&
>  	expect_from_to >expect.body $subprev $subprev-dirty &&
> -	test_cmp expect.body actual.body
> +	test_cmp expect.body actual.body &&
> +	git diff --ignore-submodules=all HEAD >actual2 &&
> +	echo -n "" | test_cmp - actual2 &&
> +	git diff --ignore-submodules=untracked HEAD >actual3 &&
> +	echo -n "" | test_cmp - actual3 &&
> +	git diff --ignore-submodules=dirty HEAD >actual4 &&
> +	echo -n "" | test_cmp - actual4
>  '
> 
>  test_expect_success 'git diff (empty submodule dir)' '
> diff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh
> index 019acb9..f44b906 100755
> --- a/t/t4041-diff-submodule-option.sh
> +++ b/t/t4041-diff-submodule-option.sh
Previous: Jens LehmannNext: Jens Lehmann
Message 4 of 14 in “Add optional parameters to the diff option "--ignore-submodules"”
  1. 0/2 Add optional parameters to the diff option "--ignore-submodules"Jens Lehmann, Jun 8, 2010
  2. 1/2 git diff: rename test that had a conflicting nameJens Lehmann, Jun 8, 2010
  3. 2/2 Add optional parameters to the diff option "--ignore-submodules"Jens Lehmann, Jun 8, 2010
  4. Brandon CaseyJun 24, 2010
  5. Jens LehmannJun 24, 2010
  6. Junio C HamanoJun 8, 2010
  7. Jens LehmannJun 8, 2010
  8. Johannes SchindelinJun 8, 2010
  9. Junio C HamanoJun 8, 2010
  10. Johannes SchindelinJun 8, 2010
  11. Johan HerlandJun 8, 2010
  12. Jens LehmannJun 8, 2010
  13. Johan HerlandJun 8, 2010
  14. Jens LehmannJun 9, 2010

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.