Re: [PATCH 02/18] t5613: drop test_valid_repo function
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Oct 4, 2016, 05:50 UTC
- Message-ID
- <CA+P7+xoUbOCRh0C6CAFHgw2NKLstUs_jGHbMQwvqTidfOoEHqQ@mail.gmail.com>
- In-Reply-To
- <20161003203357.3cpeg2jyalzykm65@sigill.intra.peff.net>
On Mon, Oct 3, 2016 at 1:33 PM, Jeff King <peff@peff.net> wrote:
Show 9 quoted lines
> This function makes sure that "git fsck" does not report any > errors. But "--full" has been the default since f29cd39 > (fsck: default to "git fsck --full", 2009-10-20), and we can > use the exit code (instead of counting the lines) since > e2b4f63 (fsck: exit with non-zero status upon errors, > 2007-03-05). > > So we can just use "git fsck", which is shorter and more > flexible (e.g., we can use "git -C").
This seems obviously correct. I didn't understand your comment about the use of "git -C" at first, because I was confused about why "git -C" doesn't work with "git --full", but then I realized you can't use "git -C" with the shell test_valid_repo function.
Thanks, Jake
Show 20 quoted lines
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> t/t5613-info-alternate.sh | 19 +++++++------------
> 1 file changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/t/t5613-info-alternate.sh b/t/t5613-info-alternate.sh
> index e13f57d..4548fb0 100755
> --- a/t/t5613-info-alternate.sh
> +++ b/t/t5613-info-alternate.sh
> @@ -6,11 +6,6 @@
> test_description='test transitive info/alternate entries'
> . ./test-lib.sh
>
> -test_valid_repo() {
> - git fsck --full > fsck.log &&
> - test_line_count = 0 fsck.log
> -}
> -
> base_dir=$(pwd)