File tree Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -132,10 +132,34 @@ export function combineRewrittenLists(rewrittenListFileContent: string): Combine
132132 // pointless
133133 continue
134134 } else {
135- throw new Error (
136- `NOT IMPLEMENTED - identical key in 'amend' and 'rebase', but different values.`
137- + `(key = "${ key } ", amend's value = "${ value } ", rebase's value = "${ list . mapping [ key ] } ")`
138- )
135+ //throw new Error(
136+ // `NOT IMPLEMENTED - identical key in 'amend' and 'rebase', but different values.`
137+ //+ `(key = "${key}", amend's value = "${value}", rebase's value = "${list.mapping[key]}")`
138+ //)
139+
140+ /**
141+ * amend
142+ * A->B
143+ *
144+ * rebase
145+ * A->C
146+ *
147+ *
148+ * hmm.
149+ * will we need to keep track of _when_ the post-rewrite happened as well?
150+ * (i.e. on what commit)
151+ * though, idk if that's possible, i think i already tried,
152+ * but since the post-rewrite script is called _after_ the amend/rebase happens,
153+ * it gives you the same commit that you already have,
154+ * i.e. the already rewritten one, instead of the previous one...
155+ *
156+ */
157+
158+ /**
159+ * for starters, we can try always favoring the amend over rebase
160+ */
161+ Object . assign ( list . mapping , amend . mapping )
162+
139163 }
140164 } else {
141165 if ( Object . values ( list . mapping ) . includes ( key ) ) {
You can’t perform that action at this time.
0 commit comments