Junio C Hamano <gitster@xxxxxxxxx> writes: >> read_strategy_opts(opts, &buf); >> - strbuf_release(&buf); >> + strbuf_reset(&buf); > > As read_oneliner() has a strbuf_reset() at the beginning *anyway*, > why not just get rid of the call to _release() here instead? After > all, there is no _release() or _reset() before the call to read_oneliner() > in the next hunk, or two calls to read_oneliner() inside the > read_strategy_opts() function called in the above. Ah, I was reading the state of applying the series thru to the end. At this point, there is no reset there, so you'd need to call reset to ensure that the next read_oneliner() on &buf will not append, but restart from the beginning. >> if (read_oneliner(&buf, rebase_path_squash_onto(), 0)) { >> - if (get_oid_hex(buf.buf, &opts->squash_onto) < 0) >> - return error(_("unusable squash-onto"));