summaryrefslogtreecommitdiff
path: root/git-gui/lib
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2025-08-06 23:15:20 +0000
committerJunio C Hamano <gitster@pobox.com>2025-08-07 13:23:59 -0700
commitd3de9786003e9a35e2d909bfd852bcf19199efcc (patch)
tree1cb79ef35300e4490f3326c6085a87c9682e1079 /git-gui/lib
parentdb5015acc463668735bc7b95e1ca6415fd7948d3 (diff)
merge-ort: clarify the interning of strings in opt->priv->path
Because merge-ort is dealing with potentially all the pathnames in the repository, it sometimes needs to do an awful lot of string comparisons. Because of this, struct merge_options_internal's path member was envisioned from the beginning to contain an interned value for every path in order to allow us to compare strings via pointer comparison instead of using strcmp. See * 5b59c3db059d (merge-ort: setup basic internal data structures, 2020-12-13) * f591c4724615 (merge-ort: copy and adapt merge_3way() from merge-recursive.c, 2021-01-01) for some of the early comments. However, the original comment was slightly misleading when it switched from mentioning paths to only mentioning directories. Fix that, and while at it also point to an example in the code which applies the extra needed care to permit the pointer comparison optimization. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib')
0 files changed, 0 insertions, 0 deletions