Re: [PATCH 2/2] Add optional parameters to the diff option "--ignore-submodules"
- From
- Brandon 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