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

Remote: Push, add support to push commits per hashes #325

Merged
merged 2 commits into from Nov 1, 2021

Commits on Oct 28, 2021

  1. Add support to push commits per hashes

    Using plain git, the command `git push ${sha}:refs/heads/some-branch`
    actually ensures that the remote branch `some-branch` points to the
    commit `${sha}`.
    
    In the current version of go-git, this results in an "everything is
    up to date" error.
    
    When a source reference is not found, check the object storage to find
    the sha. If it is found, consider pushing this exact commit.
    
    fixes: go-git#105
    tjamet committed Oct 28, 2021
    Copy the full SHA
    617ae9f View commit details
    Browse the repository at this point in the history
  2. Document the push refspec format

    Taken from `git help push` and adapted to match the supported features
    only.
    
    Future iterations of this feature may include better support for git
    "SHA-1 expression", documented in `git help push` as:
    
    > any arbitrary "SHA-1 expression", such as master~4 or HEAD (see gitrevisions(7)).
    tjamet committed Oct 28, 2021
    Copy the full SHA
    21d8d7e View commit details
    Browse the repository at this point in the history