diff mbox series

[4/5] merge-ort: fix accidental strset<->strintmap

Message ID 97fa3d73e88edb5d07ae073c4bf9afa521982600.1742108339.git.gitgitgadget@gmail.com (mailing list archive)
State Accepted
Commit 5692a46b098adf172c641c02f920589fc33d01a4
Headers show
Series Miscellaneous fixups preparing for the removal of merge-recursive | expand

Commit Message

Elijah Newren March 16, 2025, 6:58 a.m. UTC
From: Elijah Newren <newren@gmail.com>

Both strset_for_each_entry and strintmap_for_each_entry are macros that
evaluate to the same thing, so they are technically interchangeable.
However, the intent is that we use the one matching the variable type we
are passing.  Unfortunately, I somehow mistakenly got one of these wrong
in 7bee6c100431 (merge-ort: avoid recursing into directories when we
don't need to, 2021-07-16) -- possibly related to the fact that
relevant_sources was initially a strset and later refactored into a
strintmap.  Correct which macro we use.

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 merge-ort.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/merge-ort.c b/merge-ort.c
index 46e78c3ffa6..a12aa213b06 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -1517,8 +1517,8 @@  static int handle_deferred_entries(struct merge_options *opt,
 		struct strintmap copy;
 
 		/* Loop over the set of paths we need to know rename info for */
-		strset_for_each_entry(&renames->relevant_sources[side],
-				      &iter, entry) {
+		strintmap_for_each_entry(&renames->relevant_sources[side],
+					 &iter, entry) {
 			char *rename_target, *dir, *dir_marker;
 			struct strmap_entry *e;