tiktok / sparo

Sparo optimizes performance of Git operations for your large frontend monorepo.
https://tiktok.github.io/sparo/
MIT License
162 stars 8 forks source link

Feat improve necessary check #69

Closed chengcyber closed 5 months ago

chengcyber commented 5 months ago

Basic Checks

Have you run rush change for this change?

If No, please run rush change before, this is necessary.

If adding a new feature, the PR's description includes:

Does this PR introduce a breaking change? (check one)

If yes, please describe the impact and migration path for existing applications:

Summary

Improve the logic to avoid unnecessary git operations when tracking remote branches.

Detail

  1. Do not run "git remote set-branches --add" if it's not a single branch mode
  2. Do not run the special logic for temporarily turn off single branch mode if it's not a single branch mode.

How to test it

Local