aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* *: Remove use of deprecated io/utilPaulo Gomes2023-05-1147-136/+96
| | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* *: Remove redudant err nil checksPaulo Gomes2023-05-114-18/+4
| | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* Merge pull request #769 from AriehSchneier/fix-test-cleanPaulo Gomes2023-05-113-27/+31
|\ | | | | git: Testing, Fix tests not cleaning temp folders
| * git: Testing, Fix tests not cleaning temp foldersArieh Schneier2023-05-113-27/+31
|/ | | | Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
* Merge pull request #754 from matejrisek/feature/submodule-clone-depthPaulo Gomes2023-05-043-1/+34
|\ | | | | git: Add Depth to SubmoduleUpdateOptions
| * git: Add Depth to SubmoduleUpdateOptionsmatej.risek2023-05-043-1/+34
| |
* | Merge pull request #722 from AriehSchneier/populate-indexPaulo Gomes2023-05-042-0/+25
|\ \ | | | | | | storage: filesystem, Populate index before use. Fixes #148
| * | storage: filesystem, Populate index before use. Fixes #148Arieh Schneier2023-05-042-0/+25
| | | | | | | | | | | | Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
* | | Merge pull request #744 from aryan9600/proxy-optionsPaulo Gomes2023-05-0422-68/+883
|\ \ \ | |/ / |/| | Add support for custom proxy settings
| * | plumbing: transport/http, add support for custom proxy URLsSanskar Jaiswal2023-05-049-1/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for custom HTTP and HTTPS proxies for each session. The tests require server certificate and a matching private key to be able to run a TLS server and test HTTPS proxy functionality. The cert and the key are stored in `plumbing/transport/http/testdata/certs` and were generated using the following command: `openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt` Note: All details were left empty, except for the FQDN for which example.com was used. Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
| * | plumbing: transport/http, refactor transport to cache underlying transport ↵Sanskar Jaiswal2023-05-048-45/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | objects Refactor the in-built http transport to cache the underlying http transport objects mapped to its specific options for each Git transport object. This lets us reuse the transport for a specific set of configurations as recommended. (ref: https://pkg.go.dev/net/http#Transport) If there are no transport specific options provided, the default transport is used. Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
| * | plumbing: transport/ssh, add support for custom proxy URLsSanskar Jaiswal2023-05-045-14/+287
| | | | | | | | | | | | Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
| * | plumbing/transport: add ProxyOptions to specify proxy detailsSanskar Jaiswal2023-05-044-9/+51
|/ / | | | | | | Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
* | Merge pull request #719 from cbbm142/masterPaulo Gomes2023-05-032-1/+48
|\ \ | | | | | | git: worktree, add check to see if file already checked in. Fixes #718
| * | Worktree: Status, add check to see if file already checked in [Fixes 718]John Pastore2023-05-012-1/+48
| | | | | | | | | | | | Checks if an ignored file was previously checked in. If it was, then the file is not ignored matching native git behavior.
* | | Merge pull request #755 from AriehSchneier/fix-clone-branchPaulo Gomes2023-05-032-3/+23
|\ \ \ | | | | | | | | git: fix cloning with branch name
| * | | git: fix cloning with branch nameArieh Schneier2023-05-032-3/+23
| | | | | | | | | | | | | | | | Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
* | | | Merge pull request #750 from pjbgf/peelPaulo Gomes2023-05-034-8/+92
|\ \ \ \ | |/ / / |/| | | git: Add support to ls-remote with peeled references. Fixes #749
| * | | git: Add support to ls-remote with peeled references. Fixes #749Paulo Gomes2023-05-034-8/+92
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new PeelingOption field was introduced into ListOptions. The new options include the default (and backwards compatible) IgnorePeeled. Plus another two variations which either only returns peeled references (OnlyPeeled), or append peeled references to the list (AppendPeeled). The ls-remote example was updated to align with upstream, in which peeled references are appended to the results by default. A new ErrEmptyUrls error is now returned when List or ListContext do not receive a URL to work with, to improve overall execution flow. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* | | Merge pull request #728 from aymanbagabas/grep-barePaulo Gomes2023-04-263-9/+101
|\ \ \ | | | | | | | | fix: git grep bare repositories
| * | | fix: git grep bare repositoriesAyman Bagabas2023-04-263-9/+101
| | |/ | |/| | | | | | | | | | | | | Perform grep on `*Repository` instead of `*Worktree`. Fixes: https://github.com/go-git/go-git/issues/68
* | | Merge pull request #748 from pjbgf/bump-ciPaulo Gomes2023-04-262-24/+33
|\ \ \ | | | | | | | | build: Bump dependencies
| * | | build: Bump dependencies. Fixes #667Paulo Gomes2023-04-232-24/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - github.com/ProtonMail/go-crypto to version 0.0.0-20230417170513-8ee5748c52b5. - github.com/imdario/mergo to version 0.3.15. - golang.org/x/crypto to version 0.8.0. - golang.org/x/net to version 0.9.0. - golang.org/x/sys to version 0.7.0. - golang.org/x/text to version 0.9.0. - github.com/go-git/gcfg to version v1.5.1-0.20230307220236-3a3c6141e376 Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* | | | Merge pull request #743 from fcharlie/improve-packed-refsPaulo Gomes2023-04-262-43/+39
|\ \ \ \ | |/ / / |/| | | storage: filesystem/dotgit, Improve load packed-refs
| * | | storage: filesystem/dotgit, Improve load packed-refsForce Charlie2023-04-252-43/+39
| |/ /
* | | Merge pull request #735 from aymanbagabas/clone-mirrorPaulo Gomes2023-04-174-4/+55
|\ \ \ | | | | | | | | git: add mirror clone option
| * | | feat(clone): add mirror clone optionAyman Bagabas2023-04-174-4/+55
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clone remote as a mirror. This fetches all remote refs, implies bare repository, and sets the appropriate configs. Fixes: https://github.com/go-git/go-git/issues/293 Update options.go Co-authored-by: Paulo Gomes <paulo.gomes.uk@gmail.com> Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
* | | Merge pull request #715 from jotadrilo/fix/csp-likePaulo Gomes2023-04-173-35/+98
|\ \ \ | |/ / |/| | internal: Fix regression in scp-like match
| * | internal: Fix regression in csp-like matchJoseda Rios2023-04-153-35/+98
| |/ | | | | | | Signed-off-by: Joseda Rios <josriolop@gmail.com>
* | Merge pull request #739 from pjbgf/fix-ciPaulo Gomes2023-04-123-3/+4
|\ \ | | | | | | ci: Fix upstream git build for master branch
| * | ci: Fix upstream git build for master branchPaulo Gomes2023-04-113-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes upstream broke the compatibility test, which now requires libcurl installed in order to successfully build. Additionally, the .git-dist dir was added to the .gitignore file. Fixes: https://github.com/go-git/go-git/actions/runs/4670641376/jobs/8270625669 Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* | | Merge pull request #707 from pjbgf/experimental-sha256Paulo Gomes2023-04-1123-60/+298
|\ \ \ | |/ / |/| | *: Add support for initializing SHA256 repositories
| * | examples: Add example for SHA256 repositoriesPaulo Gomes2023-03-083-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new example on initializing a new repository with object format SHA256. A new Makefile target was created to run the example to ensure that new changes won't break SHA256 support going forwards. Relates to the SHA256 implementation, defined in #706. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
| * | *: Support variable length plumbing.HashPaulo Gomes2023-03-0813-38/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The variable length for plumbing.Hash is defined at build time, blocked by tag sha256. This approach was a trade-off between keeping backwards compatibility while making progress towards supporting SHA256 with a small amount of changes. Relates to the SHA256 implementation, defined in #706. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
| * | config: Add Repository Format ExtensionPaulo Gomes2023-03-084-22/+149
| | | | | | | | | | | | | | | | | | Relates to the SHA256 implementation, defined in #706. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
| * | plumbing/hash: Add SHA256 as a supported algorithmPaulo Gomes2023-03-073-0/+33
| | | | | | | | | | | | | | | | | | Relates to #706. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* | | Merge pull request #485 from ZauberNerd/fix-non-external-delta-refPaulo Gomes2023-04-114-3/+25
|\ \ \ | |_|/ |/| | plumbing: resolve non-external delta references
| * | plumbing: resolve non-external delta referencesZauberNerd2023-03-234-3/+25
|/ / | | | | | | | | | | | | | | | | | | | | In a self-contained pack file delta references might point to base objects stored later in the file. In this case we need to replace placeholders for external refs with the actual base object and update the children references. Fixes: #484 Co-authored-by: Markus Wolf <mail@markus-wolf.de>
* | Merge pull request #659 from MichaelMure/dotgit-racev5.6.1Paulo Gomes2023-03-072-0/+73
|\ \ | |/ |/| dotgit: fix a filesystem race in Refs/walkReferencesTree
| * dotgit: fix deleted references test in windowsJavi Fontan2023-03-071-2/+3
| | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * dotgit: test skip deleted referencesJavi Fontan2023-03-071-0/+67
| | | | | | | | | | | | | | Checks that reading references it correctly skips deleted directories and files. Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * dotgit: fix a filesystem race in Refs/walkReferencesTreeMichael Muré2023-01-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | In walkReferencesTree(), the filesystem is browsed recursively. After a folder is listed, each child element (directory, file) are inspected. What can happen is that by the time we get to operate on the child element, it might have been deleted from the filesystem and we would get a PathError. In the case of directories there was already a case to avoid bubbling up the error (we consider that there is no ref there, which is correct), but that was missing for files. This commit just apply the same logic.
* | Merge pull request #655 from aymanbagabas/hostkeycallbackPaulo Gomes2023-03-064-43/+101
|\ \ | | | | | | fix(ssh): unable to pass a custom HostKeyCallback func
| * | fix(ssh): unable to pass a custom HostKeyCallback funcAyman Bagabas2023-03-054-43/+101
| |/ | | | | | | | | | | | | | | Don't overwrite HostKeyCallback if one is provided. Fixes: c35b8082c863 ("plumbing: transport/ssh, auto-populate ClientConfig.HostKeyAlgorithms. Fixes #411") Fixes: https://github.com/go-git/go-git/issues/654 Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
* | Merge pull request #701 from pjbgf/buildPaulo Gomes2023-03-064-6/+6
|\ \ | | | | | | ci: Bump GitHub actions, enable go test race detection and stop using developer's GPG keys during test execution
| * | ci: Enable race detection for go testsPaulo Gomes2023-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | After the fix of data races in go-billy (go-git/go-billy/pull/28) race detection can be enabled in go-git to ensure no new issues go undetected. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
| * | ci: Bump GitHub actionsPaulo Gomes2023-03-052-4/+4
| | | | | | | | | | | | | | | | | | | | | Removes the error messages: Node.js 12 actions are deprecated. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
| * | tests: Avoid use of user's GPG keys during testsPaulo Gomes2023-03-051-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | The TestPullAdd test uses git CLI to perform a commit. Contributors with signing enabled globally would have their GPG configuration being used to sign that test commit. This behaviour was transparent for contributors that do not use secure keys which requires physical confirmation. The new behaviour disables GPG signing for that test, which was not required as part of the test. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* | Merge pull request #696 from pjbgf/fix-panic-rrPaulo Gomes2023-03-022-35/+50
|\ \ | | | | | | *: Fix panic for empty revisions. Fixes #674
| * | *: Fix panic for empty revisionsPaulo Gomes2023-03-022-35/+50
|/ / | | | | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>