Thread (60 messages) read the whole thread 60 messages, 4 authors, 2021-03-09

Re: [PATCH v2 05/10] diffcore-rename: compute dir_rename_counts in stages

From: Derrick Stolee <hidden>
Date: 2021-02-24 15:55:36

On 2/23/2021 6:44 PM, Elijah Newren via GitGitGadget wrote:
+	info->setup = 0;
+	if (!dirs_removed)
+		return;
 	info->setup = 1;
This would probably be clearer as

	if (!dirs_removed) {
		info->setup = 0;
		return;
	}
	info->setup = 1;
-MAYBE_UNUSED
Good cleanup.
quoted hunk ↗ jump to hunk
@@ -931,10 +974,17 @@ void diffcore_rename_extended(struct diff_options *options,
 		remove_unneeded_paths_from_src(want_copies);
 		trace2_region_leave("diff", "cull after exact", options->repo);
 
+		/* Preparation for basename-driven matching. */
+		trace2_region_enter("diff", "dir rename setup", options->repo);
+		initialize_dir_rename_info(&info,
+					   dirs_removed, dir_rename_count);
+		trace2_region_leave("diff", "dir rename setup", options->repo);
+
The parts visible in this context are pretty trivial, but this
method _is_ doing a lot of work. Good to mark it with a trace
region so we can identify if/when it is a problem.

Thanks,
-Stolee
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help