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

git: add PushConfig to specify push config and add support for refspecs #550

Merged
merged 3 commits into from
May 15, 2023

Commits on May 15, 2023

  1. git: add support for specifying refspecs for a push

    Add `PushConfig` for configuring a push operation. Users can use
    `PushConfig.Refspecs` to specify the refspecs when using `Push()`.
    
    Furthermore, fix a bug related to `Push()` where all refs were pushed to
    origin, since we did not specify a refspec and the default refspec used
    by gogit is `refs/heads/*:/refs/heads/*`.
    
    Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
    aryan9600 committed May 15, 2023
    Configuration menu
    Copy the full SHA
    88da1a6 View commit details
    Browse the repository at this point in the history
  2. gogit: rename CloneOptions to CloneConfig for consistency

    Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
    aryan9600 committed May 15, 2023
    Configuration menu
    Copy the full SHA
    39b978a View commit details
    Browse the repository at this point in the history
  3. git: add PushConfig.Force for force pushing

    Add `PushConfig.Force` for force pushing and remove
    `gogit.Client.forcePush` in favor of the former.
    
    Remove some stale test cases from `TestSwitchBranch` related to force
    push since we don't check if force pushing is enabled while switching
    branches anymore. Ref: #433
    
    Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
    aryan9600 committed May 15, 2023
    Configuration menu
    Copy the full SHA
    adda160 View commit details
    Browse the repository at this point in the history