aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #325 from tjamet/push/shaMáximo Cuadros2021-11-013-2/+141
|\ | | | | Remote: Push, add support to push commits per hashes
| * Document the push refspec formatThibault Jamet2021-10-281-2/+8
| | | | | | | | | | | | | | | | | | | | 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)).
| * Add support to push commits per hashesThibault Jamet2021-10-282-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: #105
* | Merge pull request #402 from enisdenjo/gitdir-info-excludeMáximo Cuadros2021-11-012-12/+30
|\ \ | | | | | | plumbing: gitignore, Read .git/info/exclude file too.
| * | better testsenisdenjo2021-10-271-39/+9
| | |
| * | plumbing: gitignore, Read .git/info/exclude file too.enisdenjo2021-10-272-10/+58
| |/
* | Merge pull request #403 from tklauser/bump-ssh-agent-moduleMáximo Cuadros2021-11-012-23/+15
|\ \ | | | | | | *: update github.com/xanzy/ssh-agent to v0.3.1
| * | Update github.com/xanzy/ssh-agent to v0.3.1Tobias Klauser2021-10-292-23/+15
| |/ | | | | | | | | | | | | Commands used: go get github.com/xanzy/ssh-agent@latest go mod tidy
* | Merge pull request #374 from snebel29/feat/add-exampleMáximo Cuadros2021-11-012-0/+39
|\ \ | |/ |/| examples: added "tag find if head is tagged"
| * examples: add find-if-any-tag-point-headSven Nebel2021-09-242-0/+39
| | | | | | | | Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* | Merge pull request #375 from noerw/add-remoteurl-optionMáximo Cuadros2021-10-264-5/+33
|\ \ | | | | | | Remote: add RemoteURL to {Fetch,Pull,Push}Options
| * | add testsNorwin2021-09-281-0/+12
| | |
| * | Add RemoteURL to {Fetch,Pull,Push}OptionsNorwin2021-09-153-5/+21
| |/ | | | | | | | | Can be used to override the URL to operate on: RemoteName will be ignored for the actual fetch
* | Merge pull request #385 from john-cai/add-follow-tagsMáximo Cuadros2021-10-264-0/+149
|\ \ | |/ |/| git: add --follow-tags option for pushes
| * git: add --follow-tags option for pushesJohn Cai2021-10-054-0/+149
|/ | | | This PR adds support for the --follow-tags option for pushes.
* plumbing/storer/object: improve grammar Go Doc (#350)Christopher Hunter2021-07-241-4/+4
|
* plumbing: format/packfile, prevent large objects from being read into memory ↵zeripath2021-06-3013-43/+601
| | | | | | | | | | | | | | | completely (#330) This PR adds code to prevent large objects from being read into memory from packfiles or the filesystem. Objects greater than 1Mb are now no longer directly stored in the cache or read completely into memory. This PR differs and improves the previous broken #323 by fixing several bugs in the reader and transparently wrapping ReaderAt as a Reader. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Revert "plumbing: format/packfile, prevent large objects from being read ↵v5.4.2zeripath2021-06-027-422/+1
| | | | | into memory completely (#303)" (#329) This reverts commit 720c192831a890d0a36b4c6720b60411fa4a0159.
* remote: patch default timeout for `List` (#321)v5.4.1Nicolas Chagrass2021-05-241-1/+1
| | | It looks a test value was shipped breaking a lot of the usage of the library.
* plumbing: format/packfile, prevent large objects from being read into memory ↵v5.4.0zeripath2021-05-127-1/+422
| | | | | | | | | | | completely (#303) This PR adds code to prevent large objects from being read into memory from packfiles or the filesystem. Objects greater than 1Mb are now no longer directly stored in the cache or read completely into memory. Signed-off-by: Andrew Thornton <art27@cantab.net>
* plumbing: object/patch, printStat strings.Repeat cause panic (#310) cookeem2021-05-121-2/+10
|
* git: Add support for deepening shallow clones (#311)Marcus Watkins2021-05-123-2/+70
|
* plumbing: transport/http, skip flaky testMáximo Cuadros2021-05-031-0/+4
|
* go modules: update go-git-fixturesMáximo Cuadros2021-05-032-5/+10
|
* *: use go-billy instead of os callsMáximo Cuadros2021-05-0225-568/+521
|
* utils: ioutil, Pipe implementatioMáximo Cuadros2021-05-026-4/+33
|
* plumbing: format, use os.UserHomeDir()Máximo Cuadros2021-05-029-155/+72
|
* Remote: new ListContext function (#278)Xiang Xiujuan2021-04-212-1/+30
|
* 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