Subject: Re: [PATCH 3/5] reftable/writer: simplify writing index records

From: Patrick Steinhardt <[email-masked]>
Date: Thu, 1 Feb 2024 09:39:34 +0100

On Wed, Jan 31, 2024 at 04:55:33PM +0100, Kristoffer Haugsbakk wrote:
> Hi
> 
> It looks like this isn’t in `next` yet so I’ll leave a comment.
> 
> > @@ -405,6 +405,7 @@ static int writer_finish_section(struct reftable_writer *w)
> >  		w->index = NULL;
> >  		w->index_len = 0;
> >  		w->index_cap = 0;
> > +
> 
> This part and the next quoted one seem to be an unrelated edit by
> `clang-format`. They could perhaps be grouped in their own patch.

I'll just drop this newline change here, it indeed does make the reader
wonder what's going on. I'll keep the other one though -- it does not
quite feel sensible to move it into its own patch.

Thanks!

Patrick

> > -				abort();
> > -			}
> >  		}
> > -		for (i = 0; i < idx_len; i++) {
> > +
> > +		for (i = 0; i < idx_len; i++)
> >  			strbuf_release(&idx[i].last_key);
> > -		}
> >  		reftable_free(idx);
> >  	}
> 
> -- 
> Kristoffer Haugsbakk