Commit 6c13b00592a6253b4a4de885b1f595e141b65281

Stefan Sperling 2021-09-02T13:57:34

Update comment regarding the merged_paths list used by rebase and histedit with insight I obtained while trying to make this idea work, and failing...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/lib/worktree.c b/lib/worktree.c
index 9dcec45..d6df04c 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -6359,8 +6359,13 @@ rebase_commit(struct got_object_id **new_commit_id,
 	/*
 	 * If possible get the status of individual files directly to
 	 * avoid crawling the entire work tree once per rebased commit.
-	 * TODO: Ideally, merged_paths would contain a list of commitables
+	 *
+	 * Ideally, merged_paths would contain a list of commitables
 	 * we could use so we could skip worktree_status() entirely.
+	 * However, we would then need carefully keep track of cumulative
+	 * effects of operations such as file additions and deletions
+	 * in 'got histedit -f' (folding multiple commits into one),
+	 * and this extra complexity is not really worth it.
 	 */
 	if (merged_paths) {
 		struct got_pathlist_entry *pe;