aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* plumbing: transport/file, replace os/exec with golang.org/x/sys/execabs to ↵Máximo Cuadros2021-04-173-9/+12
| | | | improve path security
* plumbing: transport/ssh, support more formats in `NewPublicKeys` SSH helper ↵Hidde Beydals2021-04-172-18/+11
| | | | | | | | | | | | | | | (#298) * Add failing ED25519 encrypted PEM test Signed-off-by: Hidde Beydals <hello@hidde.co> * Support more formats in `NewPublicKeys` SSH helper By switching to `ParsePrivateKey` and `ParsePrivateKeyWithPassphrase` from `crypto/ssh`, which has support for RSA (PKCS#1), PKCS#8, DSA (OpenSSL), and ECDSA private keys. Signed-off-by: Hidde Beydals <hello@hidde.co>
* Repository: test, use raw string to avoid double-escape (#288)Jeff Widman2021-04-161-1/+1
|
* *: remove unused unexported const (#286)Jeff Widman2021-04-161-2/+0
| | | This is never used in the code, and not available publicly, so safe to remove.
* *: typo fixes #291 Jeff Widman2021-04-161-2/+2
|
* Minor doc fixes (#287)Jeff Widman2021-04-165-14/+10
|
* plumbing: object, fix TestDecodeAndVerify testMáximo Cuadros2021-04-161-44/+53
|
* Fetch submodules pointing to orphaned but still reachable commits (#284)Nikolay Edigaryev2021-04-061-0/+18
|
* *: replace golang.org/x/crypto/openpgp by ↵Johan Fleury2021-04-0611-98/+61
| | | | github.com/ProtonMail/go-crypto/openpgp (#283)
* plumbing: transport/ssh, fix no agent test on windowsv5.3.0Máximo Cuadros2021-03-291-1/+1
|
* go modules updatedMáximo Cuadros2021-03-262-10/+48
|
* github-action: update go versionMáximo Cuadros2021-03-261-1/+1
|
* *: fix flaky testMáximo Cuadros2021-03-262-1/+5
|
* plumbing: wire up contexts for Transport.AdvertisedReferences (#246)Andrew Suffield2021-03-2610-18/+120
| | | | | * plumbing: wire up contexts for Transport.AdvertisedReferences * add more tests for context wiring
* transport: ssh, fix cloning large repositories (#272)David Cuadrado2021-03-263-1/+33
| | | | | | | | | | | | | | | | | * Fix cloning large repositories Ignore the error on close when the connection is already closed Fixes #70 * Compatibility for go 1.13 Because it's required by the pipeline * Add test for allowing to close a command when the client is already closed This test is for issue #70 * Add debug information for broken test
* add RequireRemoteRefs to PushOptions (#258)Andrew Suffield2021-03-253-0/+90
| | | | | | | | | | | | | | | | | | The git protocol itself uses a compare-and-swap mechanism, where changes send the old and new values and the change is only applied if the old value matches. This is used to implement the --force-with-lease feature in git push. go-git populates the `old` field with the current value of the ref that is read from the remote. We can implement a convenient (albeit more limited) form of the --force-with-lease feature just by allowing the caller to specify particular values for this ref. Callers can then implement complex multi-step atomic operations by reading the ref themselves at the start of the process, and passing to in RequireRemoteRefs at the end. This is also a suitable building block for implementing --force-with-lease (#101), which is mostly an exercise in computing the correct hash to require. Hence, this appears to be the most reasonable API to expose.
* diff: Allow srcPrefix and dstPrefix to be configured (#265)Andrew Nelson2021-03-112-6/+53
| | | | | | | | | * diff: Allow srcPrefix and dstPrefix to be configured The default behavior here remains the same, but this change does allow consumers of the UnifiedEncoder to set their own path prefixes which will override the defaults of a/ and b/. * Add unit test for src/dstPrefix in encoder
* plumbing: gitignore, Fix gitconfig path in LoadSystemPatterns doc (#256)Andrew Archibald2021-03-101-1/+1
|
* git: worktree_commit, just store objects not already stored (#224)jsteuer2021-02-092-0/+63
| | | * git: worktree_commit, just store objects not already stored
* worktree: Don't remove root directory when cleaning (#230)hansmi2021-01-272-1/+33
| | | | | | | When using a separate worktree directory while working on a bare repository, cleaning with CleanOptions{Dir: true} would also remove the root worktree directory if empty. Signed-off-by: Michael Hanselmann <public@hansmi.ch>
* Add insecureSkipTLS and cabundle (#228)Daishan Peng2021-01-276-20/+85
| | | | | This PR add insecureSkipTLSVerify and cabundle to any remote http calls so that https repo with private CA signed can be used. This is the equivalent of https.sslVerify and GIT_SSL_CAINFO
* Adding "object-format" and "filter" capabilities (#222)Roberto O. Fernández Crisial2021-01-271-1/+8
| | | | * plumbing: protocol/packp, Adding object-format and filter capabilities. Fixes #220
* config: support insteadOf for remotes' URLs (#79)Kostya Ostrovsky2020-12-014-2/+239
|
* Merge pull request #178 from tomlazar/defaultbranchMáximo Cuadros2020-10-302-0/+56
|\ | | | | config: add init.defaultBranch to the config
| * add some testsThomas Lazar2020-10-091-0/+27
| |
| * Add init.defaultBranch to the configThomas Lazar2020-09-302-0/+29
| |
* | Merge pull request #195 from adracus/fix.relative-submodulesMáximo Cuadros2020-10-303-27/+42
|\ \ | | | | | | Fix relative submodule resolution
| * | Fix relative submodule resolutionAxel Christ2020-10-283-27/+42
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the current behavior, the config will always hold the resolved, absolute URL, leavin the user of go-git no choice to determine whether the original URL is relative or not. This changes to employ relative URL resolution only when resolving a submodule to a repository to keep the correct configuration 'unresolved' and intact. Change relative resolution using `filepath.Dir` to `path.Join` while parsing both the 'root' and the relative URL with `net/url.URL`. Adapt test to verify the new behavior. Re-fixes #184 (see comments).
* | Merge pull request #184 from mikyk10/masterMáximo Cuadros2020-10-202-2/+70
|\ \ | | | | | | git: worktree, Support relative submodule URL.
| * | git: worktree, Support relative submodule URL.Mitsutaka Naito2020-10-132-2/+70
|/ /
* | Merge pull request #162 from yabberyabber/fetch-errorv5.2.0Máximo Cuadros2020-10-092-1/+16
|\ \ | | | | | | Fetch should return a unique error type when ref not found
| * | Fetch should return a unique error type when ref not foundandrew2nelson2020-09-022-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | It can be useful for callers to distinguish between an error of "couldn't find remote ref" and some other error like "network error". Creating an explicit error type for this allows consumers to determine the kind of error using the errors.Is and errors.As interface added in go1.13
* | | Merge pull request #112 from MichaelMure/complete-configMáximo Cuadros2020-10-096-56/+369
|\ \ \ | |_|/ |/| | config: add missing functions for completeness
| * | Add testsvince2020-08-273-9/+267
| | |
| * | config: add missing functions for completenessMichael Muré2020-06-243-47/+102
| | |
* | | Merge pull request #161 from ashokponkumar/masterMáximo Cuadros2020-09-042-0/+22
|\ \ \ | |_|/ |/| | PlainOpenWithOptions: support file path
| * | support file path in PlainOpenWithOptions - do only when detect flag is enabledAshok Pon Kumar2020-09-022-2/+6
| | |
| * | support file path in PlainOpenWithOptionsAshok Pon Kumar2020-09-022-0/+18
|/ /
* | Merge pull request #158 from chrisgavin/fix-force-push-delete-referenceMáximo Cuadros2020-08-312-1/+26
|\ \ | | | | | | git: remote, Fix deleting references when force pushing.
| * | git: remote, Fix deleting references when force pushing.Chris Gavin2020-08-282-1/+26
|/ /
* | Merge pull request #146 from fatelei/clone_with_sshMáximo Cuadros2020-08-242-0/+53
|\ \ | | | | | | chore: add an exmaple: clone with ssh
| * | chore: add an exmaple: clone with sshfatelei2020-08-222-0/+53
|/ /
* | Merge pull request #139 from StupidScience/113-git-commit-all-fixMáximo Cuadros2020-07-211-2/+8
|\ \ | | | | | | Worktree.Commit: speed up commit with all: true option
| * | speed up commit with all: true optionAnton Kaymakchi2020-07-211-2/+8
|/ /
* | Merge pull request #125 from cristaloleg/minor-linter-fixesMáximo Cuadros2020-07-169-24/+18
|\ \ | | | | | | *: minor linter fixes
| * | revert time.Unix typecastOleg Kovalov2020-07-141-1/+1
| | |
| * | fix slice capacityOleg Kovalov2020-07-071-1/+1
| | |
| * | Minor linter fixesOleg Kovalov2020-07-0610-25/+19
| | |
* | | Merge pull request #136 from dsymonds/revparse-partial-hashMáximo Cuadros2020-07-168-10/+234
|\ \ \ | | | | | | | | Repository.ResolveRevision, support partial hashes
| * | | Support partial hashes in Repository.ResolveRevision.David Symonds2020-07-168-10/+234
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like `git rev-parse <prefix>`, this enumerates the hashes of objects with the given prefix and adds them to the list of candidates for resolution. This has an exhaustive slow path, which requires enumerating all objects and filtering each one, but also a couple of fast paths for common cases. There's room for future work to make this faster; TODOs have been left for that. Fixes #135.