git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/4] merge-ort: drop unused "opt" parameter from merge_check_renames_reusable()

From
Jeff King <peff@peff.net>
Date
Sep 14, 2023, 09:40 UTC
Message-ID
<20230914094004.GD2254894@coredump.intra.peff.net>
In-Reply-To
<20230914093409.GA2254811@coredump.intra.peff.net>

The merge_options parameter has never been used since the function was introduced in 64aceb6d73 (merge-ort: add code to check for whether cached renames can be reused, 2021-05-20). In theory some merge options might impact our decisions here, but that has never been the case so far.

Let's drop it to appease -Wunused-parameter; it would be easy to add back later if we need to (there is only one caller).

Signed-off-by: Jeff King <peff@peff.net>
---
 merge-ort.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/merge-ort.c b/merge-ort.c
index 20eefd9b5e..3953c9f745 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -4880,8 +4880,7 @@ static void merge_start(struct merge_options *opt, struct merge_result *result)
 	trace2_region_leave("merge", "allocate/init", opt->repo);
 }
 
-static void merge_check_renames_reusable(struct merge_options *opt,
-					 struct merge_result *result,
+static void merge_check_renames_reusable(struct merge_result *result,
 					 struct tree *merge_base,
 					 struct tree *side1,
 					 struct tree *side2)
@@ -5083,7 +5082,7 @@ void merge_incore_nonrecursive(struct merge_options *opt,
 
 	trace2_region_enter("merge", "merge_start", opt->repo);
 	assert(opt->ancestor != NULL);
-	merge_check_renames_reusable(opt, result, merge_base, side1, side2);
+	merge_check_renames_reusable(result, merge_base, side1, side2);
 	merge_start(opt, result);
 	/*
 	 * Record the trees used in this merge, so if there's a next merge in
-- 
2.42.0.628.g8a27295885
Previous: Elijah NewrenNext: Elijah Newren
Message 8 of 15 in “merge-ort unused parameter cleanups”
  1. 0/4 merge-ort unused parameter cleanupsJeff King, Sep 14, 2023
  2. 1/4 merge-ort: drop custom err() functionJeff King, Sep 14, 2023
  3. Elijah NewrenSep 16, 2023
  4. Jeff KingSep 16, 2023
  5. 2/4 merge-ort: stop passing "opt" to read_oid_strbuf()Jeff King, Sep 14, 2023
  6. 3/4 merge-ort: drop unused parameters from detect_and_process_renames()Jeff King, Sep 14, 2023
  7. Elijah NewrenSep 16, 2023
  8. 4/4 merge-ort: drop unused "opt" parameter from merge_check_renames_reusable()Jeff King, Sep 14, 2023
  9. Elijah NewrenSep 16, 2023
  10. Jeff KingSep 16, 2023
  11. Elijah NewrenSep 16, 2023
  12. 5/4 merge-ort: lowercase a few error messagesJeff King, Sep 16, 2023
  13. Jeff KingSep 16, 2023
  14. Junio C HamanoSep 16, 2023
  15. Jeff KingSep 16, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.