-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use parent type/name to match file moves with identical name/hash #631
Conversation
@@ -161,6 +153,11 @@ export class ShadowRepo { | |||
filter: fileFilter(this.packageDirs), | |||
}); | |||
|
|||
// isomorphic-git stores things in unix-style tree. Convert to windows-style if necessary | |||
if (IS_WINDOWS) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needed to be above moveDetection so that all of that code could have deterministic paths based on the OS (because SDR Resolver is os-dependent)
excludeNonMatchingTypes(isWindows)(registry)( | ||
compareHashes( | ||
await buildMaps( | ||
async ({ added, deleted }: AddedAndDeletedFilenames): Promise<StringMapsForMatches> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simplify some functions;
we only need to do resolving once since it happens earlier
); | ||
return { fullMatches: matches, deleteOnly }; | ||
} | ||
return { fullMatches: matches, deleteOnly: new Map<string, string>() }; | ||
}; | ||
|
||
/** given a StringMap, resolve the metadata types and return things that having matching type/parent */ | ||
const excludeNonMatchingTypes = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type, parent name and parent type are now part of the key. So all this is moot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review looks good
What does this PR do?
allow identical basename and file hash to match when they have the same type and parent (expanding the key)
What issues does this PR fix or reference?
@W-16150330@
forcedotcom/cli#2945
the first local NUT run for the new test should fail. The next commit includes the fix, which should make the test green.