Skip to content

Conversation

@armooo
Copy link

@armooo armooo commented Dec 30, 2019

Smart prune support works by only adding files from
TransformResult.getAffectedFilesForSmartPrune to the git index. This
causes files that only changed due to non-reversible transforms to be
excluded from the commit.

Smart prune is also a large performance improvement when the workflow's
destination_files are a small subset of a large monorepo. The behavior
without smart prune is to remove most of the SoT repo from the index
only to then add it back in AddExcludedFilesToIndex.

I am not sure if the git smart prune behavior matches that of other
destinations because getAffectedFilesForSmartPrune was only used in a
few tests in the OSS codebase. But given the API of TransformResult I
am assuming the piper destination must be doing something similar.

Smart prune support works by only adding files from
TransformResult.getAffectedFilesForSmartPrune to the git index. This
causes files that only changed due to non-reversible transforms to be
excluded from the commit.

Smart prune is also a large performance improvement when the workflow's
destination_files are a small subset of a large monorepo. The behavior
without smart prune is to remove most of the SoT repo from the index
only to then add it back in AddExcludedFilesToIndex.

I am not sure if the git smart prune behavior matches that of other
destinations because getAffectedFilesForSmartPrune was only used in a
few tests in the OSS codebase. But given the API of TransformResult I
am assuming the piper destination must be doing something similar.
@mikelalcon
Copy link
Collaborator

Hi,

Sorry for the delay. I'll try to review this soon.

@mikelalcon
Copy link
Collaborator

thanks for the change :)

@mikelalcon
Copy link
Collaborator

Some update on this, we are working on a better smart prune. We think it git.destination could also benefit from it. But the tests added here are interesting to have once the implementation is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants