Re: [RFC PATCH] pack-refs: fail on falsely sorted packed-refs

2019-02-22 Thread Max Kirillov
On Wed, Feb 13, 2019 at 11:56:16AM +0100, SZEDER Gábor wrote: >>> + if (iter) >>> + { > > According to our CodingGuidelines, the opening bracket should go on > the same line as the condition, i.e. > > if (iter) { Oh, thanks. I must have been professionally deformed.

Re: [RFC PATCH] pack-refs: fail on falsely sorted packed-refs

2019-02-22 Thread Max Kirillov
On Wed, Feb 13, 2019 at 11:08:01AM +0100, Ævar Arnfjörð Bjarmason wrote: > You have an extra two whitespaces after "&&" there. Thanks, will check it. >> +git commit --allow-empty -m commit && > Looks like just "test_commit A" would do here. About this I'm not sure. AFAIK test_commit does lot

Re: [RFC PATCH] pack-refs: fail on falsely sorted packed-refs

2019-02-13 Thread Jeff King
On Wed, Feb 13, 2019 at 11:08:01AM +0100, Ævar Arnfjörð Bjarmason wrote: > > I happened to have a not really sorted packed-refs file. As you might guess, > > it was quite wtf-ing experience. It worked, mostly, but there was one branch > > which just did not resolve, regardless of existing and bein

Re: [RFC PATCH] pack-refs: fail on falsely sorted packed-refs

2019-02-13 Thread SZEDER Gábor
On Wed, Feb 13, 2019 at 11:08:01AM +0100, Ævar Arnfjörð Bjarmason wrote: > > On Thu, Jan 31 2019, Max Kirillov wrote: > > refs/packed-backend.c | 15 +++ > > t/t3212-pack-refs-broken-sorting.sh | 26 ++ > > 2 files changed, 41 insertions(+) > >

Re: [RFC PATCH] pack-refs: fail on falsely sorted packed-refs

2019-02-13 Thread Ævar Arnfjörð Bjarmason
On Thu, Jan 31 2019, Max Kirillov wrote: > If packed-refs is marked as sorted but not really sorted it causes > very hard to comprehend misbehavior of reference resolving - a reference > is reported as not found. > > As the scope of the issue is not clear, make it visible by failing > pack-refs

Re: [RFC PATCH] pack-refs: fail on falsely sorted packed-refs

2019-01-31 Thread Max Kirillov
On Wed, Jan 30, 2019 at 06:31:34PM -0500, Eric Sunshine wrote: > On Wed, Jan 30, 2019 at 6:21 PM Max Kirillov wrote: >> + strbuf_addf(err, "broken sorting in >> packed-refs: '%s' > '%s'", >> + prev_ref.buf, >> +

Re: [RFC PATCH] pack-refs: fail on falsely sorted packed-refs

2019-01-30 Thread Eric Sunshine
On Wed, Jan 30, 2019 at 6:21 PM Max Kirillov wrote: > If packed-refs is marked as sorted but not really sorted it causes > very hard to comprehend misbehavior of reference resolving - a reference > is reported as not found. > > As the scope of the issue is not clear, make it visible by failing > p

[RFC PATCH] pack-refs: fail on falsely sorted packed-refs

2019-01-30 Thread Max Kirillov
If packed-refs is marked as sorted but not really sorted it causes very hard to comprehend misbehavior of reference resolving - a reference is reported as not found. As the scope of the issue is not clear, make it visible by failing pack-refs command - the one which would not suffer performance pe