Skip to content

Commit 7592e97

Browse files
committed
reducePath extras
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
1 parent f3f2525 commit 7592e97

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

reducePath.ts

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff 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)) {

0 commit comments

Comments
 (0)