Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a flag to msync execute on the default branch #288

Merged
merged 1 commit into from
Jun 22, 2024

Commits on Jun 21, 2024

  1. 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.
    smortex committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    ecd1b4f View commit details
    Browse the repository at this point in the history