Skip to content

Conversation

@a-nogikh
Copy link
Collaborator

@a-nogikh a-nogikh commented Jan 3, 2025

One more part of #5620 (see the discussion there as well).


It will let other parts of the code to use only the git-specific functionality.

@a-nogikh a-nogikh requested review from dvyukov and tarasmadan and removed request for eepeep, glpesk and mvanotti January 3, 2025 11:01
@tarasmadan
Copy link
Collaborator

Commit comment doesn't explain what's going on.
Please make it valuable for the future readers.

@tarasmadan
Copy link
Collaborator

Please start from the explanation why this git wrapper is needed.

@a-nogikh a-nogikh force-pushed the features/git-wrapper branch from 6cb29cf to ded6c19 Compare January 8, 2025 10:56
@a-nogikh
Copy link
Collaborator Author

a-nogikh commented Jan 8, 2025

Updated the commit description to

    pkg/vcs: export GitWrapper
    
    The current common vcs interface and its implementations are designed to
    support a very big number of situations (git modules, cleaning up
    complex state, etc), which is too heavy and restrictive when we just
    need a thin wrapper over the git command that supports a few basic
    operations.
    
    Refactor pkg/vcs to split out the wrapper code from the big git
    implementation of the vcs.Repo interface.
    
    Export the wrapper to enable reuse in other parts of the system.

Re. the usages -- see syz-cluster/pkg/triage/git.go in #5620.

Specifically, I could not use pkg/vcs's generic Patch because it would not support raw emails (while git apply does), so I needed a wrapper over the git command. The wrapper code was already incorporated into pkg/vcs's git, so instead of duplicating the code I split it out from the git implementation.

tarasmadan
tarasmadan previously approved these changes Jan 8, 2025
The current common vcs interface and its implementations are designed to
support a very big number of situations (git modules, cleaning up
complex state, etc), which is too heavy and restrictive when we just
need a thin wrapper over the git command that supports a few basic
operations.

Refactor pkg/vcs to split out the wrapper code from the big git
implementation of the vcs.Repo interface.

Export the wrapper to enable reuse in other parts of the system.
@a-nogikh a-nogikh added this pull request to the merge queue Jan 9, 2025
Merged via the queue into google:master with commit 9220929 Jan 9, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants