diff options
| author | James Coglan <jcoglan@gmail.com> | 2019-10-15 23:47:50 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-10-16 11:11:24 +0900 |
| commit | a551fd5efd7b82604c3254e3f7cac08eaaa97ba9 (patch) | |
| tree | 526b1ade30d3cc7929bfc66e03c45176ec15c5e3 /contrib/persistent-https | |
| parent | graph: reuse `find_new_column_by_commit()` (diff) | |
| download | git-a551fd5efd7b82604c3254e3f7cac08eaaa97ba9.tar.gz git-a551fd5efd7b82604c3254e3f7cac08eaaa97ba9.zip | |
graph: reduce duplication in `graph_insert_into_new_columns()`
I will shortly be making some changes to this function and so am trying
to simplify it. It currently contains some duplicated logic; both
branches the function can take assign the commit's column index into
the `mapping` array and increment `mapping_index`.
Here I change the function so that the only conditional behaviour is
that it appends the commit to `new_columns` if it's not present. All
manipulation of `mapping` now happens on a single code path.
Signed-off-by: James Coglan <jcoglan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
