.
This commit is contained in:
parent
4c002f9acd
commit
b07aa589ff
1 changed files with 728 additions and 530 deletions
|
|
@ -34,7 +34,7 @@ export function resolvePaths(
|
|||
const ids = Object.keys(proposed).sort(
|
||||
(a, b) =>
|
||||
Number(remote[b] === proposed[b]) -
|
||||
Number(remote[a] === proposed[a]) ||
|
||||
Number(remote[a] === proposed[a]) ||
|
||||
(a < b ? -1 : a > b ? 1 : 0)
|
||||
);
|
||||
for (const id of ids.filter(
|
||||
|
|
@ -57,12 +57,16 @@ export function mergeFileManifests(
|
|||
...Object.keys(local),
|
||||
...Object.keys(remote)
|
||||
])) {
|
||||
const path =
|
||||
local[id] === base[id]
|
||||
? remote[id]
|
||||
: remote[id] === base[id]
|
||||
? local[id]
|
||||
: remote[id];
|
||||
let path: string | undefined;
|
||||
|
||||
if (local[id] === base[id]) {
|
||||
path = remote[id];
|
||||
} else if (remote[id] === base[id]) {
|
||||
path = local[id];
|
||||
} else {
|
||||
path = remote[id];
|
||||
}
|
||||
|
||||
if (path !== undefined) proposed[id] = path;
|
||||
}
|
||||
return resolvePaths(proposed, remote);
|
||||
|
|
|
|||
Loading…
Reference in a new issue