File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
parse-todo-of-stacked-rebase Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,25 @@ export function parseNewGoodCommands(
7575
7676 let lastNewCommit : OldCommit | null = null ;
7777
78+ /**
79+ * TODO FIXME
80+ *
81+ * we're going thru oldCommits and incrementing the `i`,
82+ * even though we jump thru and keep staying at the same `goodCommandMinIndex`.
83+ *
84+ * the oldCommits are from the rewrittenList,
85+ * meaning they only begin from where the first rewrite was done
86+ * (reword/edit/etc),
87+ *
88+ * so iterating thru them to generate a new list of good commands
89+ * ofc is broken.
90+ *
91+ * instead we need to go thru the old __commands__,
92+ * whom come from the old git-rebase-todo file (of stacked rebase),
93+ * and use the oldCommits/newCommits to re-generate the rebase todo,
94+ * but now adjusted to the commits that have been rewritten.
95+ *
96+ */
7897 let goodCommandMinIndex = 1 ;
7998 for ( let i = 0 ; i < oldCommits . length ; i ++ ) {
8099 const oldCommit : OldCommit = oldCommits [ i ] ;
You can’t perform that action at this time.
0 commit comments