Re: [PATCH v2 2/2] commit-graph: don't call write_graph_chunk_large_edges() unnecessarily

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 18 Jan 2019 at 18:23, SZEDER Gábor <szeder.dev@xxxxxxxxx> wrote:
> write_commit_graph() unconditionally invokes
> write_graph_chunk_large_edges(), even when it was decided earlier that
> that chunk won't be written.  Strictly speaking there is no bug here,
> because write_graph_chunk_large_edges() won't write anything if it

> Don't call write_graph_chunk_large_edges() when that chunk won't be
> written to spare an unnecessary iteration over all commits.

This commit message (including the one-line subject) needs some
s/_large_/_extra_/.

> -       write_graph_chunk_extra_edges(f, commits.list, commits.nr);
> +       if (num_extra_edges)
> +               write_graph_chunk_extra_edges(f, commits.list, commits.nr);

Martin




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux