Skip to content

Commit

Permalink
reducePath extras
Browse files Browse the repository at this point in the history
Signed-off-by: Kipras Melnikovas <[email protected]>
  • Loading branch information
kiprasmel committed May 28, 2022
1 parent 2d4fd3c commit 138a8cf
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions reducePath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,34 @@ export function combineRewrittenLists(rewrittenListFileContent: string): Combine
// pointless
continue
} else {
throw new Error(
`NOT IMPLEMENTED - identical key in 'amend' and 'rebase', but different values.`
+ `(key = "${key}", amend's value = "${value}", rebase's value = "${list.mapping[key]}")`
)
//throw new Error(
// `NOT IMPLEMENTED - identical key in 'amend' and 'rebase', but different values.`
//+ `(key = "${key}", amend's value = "${value}", rebase's value = "${list.mapping[key]}")`
//)

/**
* amend
* A->B
*
* rebase
* A->C
*
*
* hmm.
* will we need to keep track of _when_ the post-rewrite happened as well?
* (i.e. on what commit)
* though, idk if that's possible, i think i already tried,
* but since the post-rewrite script is called _after_ the amend/rebase happens,
* it gives you the same commit that you already have,
* i.e. the already rewritten one, instead of the previous one...
*
*/

/**
* for starters, we can try always favoring the amend over rebase
*/
Object.assign(list.mapping, amend.mapping)

}
} else {
if (Object.values(list.mapping).includes(key)) {
Expand Down

0 comments on commit 138a8cf

Please sign in to comment.