]> git.ipfire.org Git - thirdparty/git.git/commit - merge-ort.c
merge-ort: implement compute_collisions()
authorElijah Newren <newren@gmail.com>
Tue, 19 Jan 2021 19:53:46 +0000 (19:53 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 21 Jan 2021 06:18:55 +0000 (22:18 -0800)
commitd9d015df4a3d794ec889dc70902d28f3ca87d817
treef0ae3782bc649be5fbeff30eb1df30ae42e74280
parentfa5e06d6902003f5f115b7497030b5c66537726e
merge-ort: implement compute_collisions()

This is nearly a wholesale copy of compute_collisions() from
merge-recursive.c, and the logic remains the same, but it has been
tweaked slightly due to:

  * using strmap.h API (instead of direct hashmaps)
  * allocation/freeing of data structures were done separately in
    merge_start() and clear_or_reinit_internal_opts() in an earlier
    patch in this series
  * there is no non_unique_new_dir data field in merge-ort; that will
    be handled a different way

It does depend on two new functions, apply_dir_rename() and
check_dir_renamed() which were introduced with simple
die-not-yet-implemented shells and will be implemented in subsequent
patches.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-ort.c