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

2019-02-12 Thread Max Kirillov
On Fri, Feb 08, 2019 at 04:40:28PM -0500, Eric Sunshine wrote: > The call to strbuf_init() is leaking the allocated strbuf buffer each > time through the loop. The typical way to re-use a strbuf, and the way > you should do it here, is strbuf_reset(). Thank you! Will fix it

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

2019-02-12 Thread Max Kirillov
On Mon, Feb 11, 2019 at 08:24:46PM +0100, Michael Haggerty wrote: > The change to `write_with_updates()` doesn't only affect `pack-refs`. > That function is also called when the `packed-refs` file has to be > rewritten when a packed reference is deleted. This is another thing > that you could test.

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

2019-02-08 Thread Eric Sunshine
On Fri, Feb 8, 2019 at 4:22 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, though it is listed by commands which output > the references list. > > As

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

2019-02-08 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, though it is listed by commands which output the references list. As the scope of the issue is not clear, make it visible by failing