Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a flag to
msync execute
on the default branch
From time to time, it makes sense to ensure we have a clean environment to work on and synchronize the module repositories with what is available on the remote end to do some local cleanup. By default we work on what is configured in modulesync_config's default branch (usualy a branch named "modulesync"), but for running `git pull` we want to be on the default branch, which may be named 'main' or 'master' depending on the repository. Using `--branch main` or `--branch master` will not have the expected outcome. Add a `--default-branch` / `-B` flag to indicate that we want to work on the default branch of the module. This allows one to do some cleanup with: ``` bundle exec msync execute --default-branch -- git pull bundle exec msync execute --default-branch -- git fetch --prune bundle exec msync execute --default-branch -- git reset --hard ``` This is hopefully more convenient than removing the whole `modules` directory and fetching all modules again.
- Loading branch information