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