On Wed, Dec 7, 2016 at 2:45 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Stefan Beller <sbeller@xxxxxxxxxx> writes: > >> + submodule_common_dir = strbuf_detach(&sb, NULL); >> + ret = get_worktrees_internal(submodule_common_dir, flags); >> + >> + free(submodule_gitdir); > > This sequence felt somewhat unusual. I would have written this > without an extra variable, i.e. > > ret = get_worktrees_internal(sb.buf, flags); > strbuf_release(&sb); Yours is cleaner; I don't remember what I was thinking. Feel free to squash it in; in case a resend is needed I will do that. Thanks, Stefan