| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
crypto.Signer was incorrectly used before. Signer documentation says
that Signer.Sign should be used on digests, whereas we were using this
on message bodies.
To fix this, create our own Signer interface (+ signableObject borrowed
from #705) that describes more accurately what we want.
As before, the expectation is that signer implementations only need to
worry about acting on encoded message bodies rather than needing to
encode objects themselves.
This is technically a breaking change from the previous Signer
implementation, but since this is new and hasn't made it into cut
release yet, this seems like an acceptible change.
Also adds example test showing how signers can be made (uses base64 for
consistent outputs).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds a new crypto.Signer option to CommitOptions as an
alternative to SignKey to allow alternative commit signers to be used.
This change byitself does not add other signing methods (e.g. ssh,
x509, gitsign), but gives callers the ability to add their own.
This roughly follows git's sign_buffer approach where go-git handles the
commit message body encoding, and hands off the encoded []byte to the signing
implementation for the signature to be returned.
Signed-off-by: Billy Lynch <billy@chainguard.dev>
|
|
|
|
|
|
|
| |
Allow checking out a worktree using a tag hash id.
Fixes: https://github.com/go-git/go-git/issues/959
Supersedes: https://github.com/go-git/go-git/pull/964
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
BuildTree now returns an ErrEmptyCommit error, when there are no
changes to be committed. This can be opted-out via
CommitOptions.AllowEmptyCommits.
This is a breaking change which enables applications to detect when
empty commits are to be created.
Some instances in which this can occur is when the fs (e.g. `billy/osfs`)
make changes to the underlying files, causing a conflict between what
the previous Git worktree state was, and the current state. Changes to
the fs implementations are orthogonal to this, and will be dealt with
separately.
The new behaviour aligns with the Git CLI, in which empty commits
returns the error message: 'nothing to commit, working tree clean'.
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|/
|
|
|
|
| |
Adds an Amend option to CommitOptions that behaves like git --amend.
This change includes modifications to the Validate function to disallow
a Commit call with both Amend and either Parents or All enabled.
|
|
|
|
| |
github.com/ProtonMail/go-crypto/openpgp (#283)
|
|
|
| |
* git: worktree_commit, just store objects not already stored
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Mark Bartel <github@spottybenny.ca>
|
| |
| |
| |
| | |
Signed-off-by: Mark Bartel <github@spottybenny.ca>
|
| |
| |
| |
| |
| |
| |
| | |
This was added in Go 1.10 and is not supported on Go 1.9. Switched to
bytes.Buffer to ensure compatibility.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|/
|
|
|
|
|
|
|
|
| |
This adds the ability to sign commits by adding the SignKey field to
CommitOptions. If present, the commit will be signed during the
WorkTree.Commit call.
The supplied SignKey must already be decrypted by the caller.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| |
|
| |
|
| |
|
|
|