Re: [PATCH v2] sha1-file: test the error behavior of alt_odb_usable()

2019-04-09 Thread Jeff King
On Tue, Apr 09, 2019 at 06:43:41PM +0900, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > > > I'll leave it up to you if you want to queue just the test patch or drop > > As I said in a separate message, I think it is good to make sure > that fsck does not crash. I do not think it is

Re: [PATCH v2] sha1-file: test the error behavior of alt_odb_usable()

2019-04-09 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > I'll leave it up to you if you want to queue just the test patch or drop As I said in a separate message, I think it is good to make sure that fsck does not crash. I do not think it is good to grep in its output. > it. I figured I'd re-send just that since I f

Re: [PATCH v2] sha1-file: test the error behavior of alt_odb_usable()

2019-04-09 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 09 2019, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >>> Yup. Just wanted to get the patch to test what we do *currently* out, >>> might loop back to finishing up the rest of this. >> >> Junio: *ping* about picking up this trivial test coverage improvement > > I was wa

Re: [PATCH v2] sha1-file: test the error behavior of alt_odb_usable()

2019-04-09 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: +test_expect_success 'print "error" on non-existing alternate' ' + git init --bare I && + echo DOES_NOT_EXIST >I/objects/info/alternates && + git -C I fsck 2>stderr && + test_i18ngrep "does not exist; check" stderr +' >>> >>> All t

Re: [PATCH v2] sha1-file: test the error behavior of alt_odb_usable()

2019-04-09 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: >> Yup. Just wanted to get the patch to test what we do *currently* out, >> might loop back to finishing up the rest of this. > > Junio: *ping* about picking up this trivial test coverage improvement I was waiting for you to make up your mind about your earlier "m

Re: [PATCH v2] sha1-file: test the error behavior of alt_odb_usable()

2019-04-08 Thread Ævar Arnfjörð Bjarmason
On Fri, Mar 29 2019, Ævar Arnfjörð Bjarmason wrote: > On Fri, Mar 29 2019, Jeff King wrote: > >> On Thu, Mar 28, 2019 at 09:04:56PM +0100, Ævar Arnfjörð Bjarmason wrote: >> >>> Add a test for the error() case in alt_odb_usable() where an alternate >>> directory doesn't exist. This behavior has b

Re: [PATCH v2] sha1-file: test the error behavior of alt_odb_usable()

2019-03-29 Thread Ævar Arnfjörð Bjarmason
On Fri, Mar 29 2019, Jeff King wrote: > On Thu, Mar 28, 2019 at 09:04:56PM +0100, Ævar Arnfjörð Bjarmason wrote: > >> Add a test for the error() case in alt_odb_usable() where an alternate >> directory doesn't exist. This behavior has been the same since >> 26125f6b9b ("detect broken alternates.

Re: [PATCH v2] sha1-file: test the error behavior of alt_odb_usable()

2019-03-29 Thread Jeff King
On Thu, Mar 28, 2019 at 09:04:56PM +0100, Ævar Arnfjörð Bjarmason wrote: > Add a test for the error() case in alt_odb_usable() where an alternate > directory doesn't exist. This behavior has been the same since > 26125f6b9b ("detect broken alternates.", 2006-02-22), but if that > error() was turne

[PATCH v2] sha1-file: test the error behavior of alt_odb_usable()

2019-03-28 Thread Ævar Arnfjörð Bjarmason
Add a test for the error() case in alt_odb_usable() where an alternate directory doesn't exist. This behavior has been the same since 26125f6b9b ("detect broken alternates.", 2006-02-22), but if that error() was turned into die() the entire test suite would still pass. Perhaps we should die() in t