Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add smart prune support to GitDestination#112

Open
armooo wants to merge 1 commit intogoogle:master from
armooo:armooo-smart_prune
Open

Add smart prune support to GitDestination #112
armooo wants to merge 1 commit intogoogle:master from
armooo:armooo-smart_prune

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.
Copy link
Collaborator

Hi,

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

Copy link
Collaborator

thanks for the change :)

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

Reviewers

@joshgoldman-google joshgoldman-google Awaiting requested review from joshgoldman-google

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /