public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail•com>
To: git@vger•kernel.org
Cc: Elijah Newren <newren@gmail•com>, Elijah Newren <newren@gmail•com>
Subject: [PATCH 4/5] merge-ort: fix accidental strset<->strintmap
Date: Sun, 16 Mar 2025 06:58:58 +0000	[thread overview]
Message-ID: <97fa3d73e88edb5d07ae073c4bf9afa521982600.1742108339.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1882.git.1742108339.gitgitgadget@gmail.com>

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 --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;
 
-- 
gitgitgadget


  parent reply	other threads:[~2025-03-16  6:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-16  6:58 [PATCH 0/5] Miscellaneous fixups preparing for the removal of merge-recursive Elijah Newren via GitGitGadget
2025-03-16  6:58 ` [PATCH 1/5] stash: remove merge-recursive.h include Elijah Newren via GitGitGadget
2025-03-16  6:58 ` [PATCH 2/5] t6423: fix a comment that accidentally reversed two commits Elijah Newren via GitGitGadget
2025-03-16  6:58 ` [PATCH 3/5] t7615: be more explicit about diff algorithm used Elijah Newren via GitGitGadget
2025-03-16  6:58 ` Elijah Newren via GitGitGadget [this message]
2025-03-16  6:58 ` [PATCH 5/5] merge-ort: remove extraneous word in comment Elijah Newren via GitGitGadget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=97fa3d73e88edb5d07ae073c4bf9afa521982600.1742108339.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=newren@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox