aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
Commit message (Collapse)AuthorAgeFilesLines
* plumbing: commitgraph, Add generation v2 supportAndrew Thornton2023-10-1215-55/+889
| | | | | | | | This PR adds in support for generation v2 support and a couple of new walkers to match --date-order etc options on log. This PR also fixes a bug in the chain code and adds more tests. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Merge pull request #866 from makkes/better-error-handlingPaulo Gomes2023-10-123-4/+124
|\ | | | | Improve handling of remote errors
| * plumbing: transport/common, Improve handling of remote errorsMax Jonas Werner2023-10-123-4/+124
| | | | | | | | | | | | | | | | | | | | | | Instead of simply returning the first line that the remote returned, go-git now actively searches all of stderr for lines that may contain a more actionable error message and returns that. In addition, this change adds a case to map the GitLab-specific error message to an ErrRepositoryNotFound error. Signed-off-by: Max Jonas Werner <mail@makk.es>
* | Merge pull request #868 from pjbgf/fix-fuzzPaulo Gomes2023-10-092-5/+34
|\ \ | | | | | | plumbing: protocol/packp, Add validation for decodeLine
| * | plumbing: protocol/packp, Add validation for decodeLinePaulo Gomes2023-10-072-5/+34
| |/ | | | | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* | Merge pull request #860 from enverbisevac/masterPaulo Gomes2023-10-082-0/+5
|\ \ | | | | | | add clone --shared feature
| * | git: clone --shared implementedenverbisevac2023-10-082-0/+5
| | |
* | | plumbing: commitgraph, fix types and handle commit-graph-chainsAndrew Thornton2023-10-0818-383/+1600
| |/ |/| | | | | | | | | | | | | | | Unfortunately the original variant makes some incorrect typing assumptions about commit-graphs which make handling graph chains difficult to do correctly. This creates a new subpackage and deprecates the old one. It then adds support commit graph chains. Signed-off-by: Andrew Thornton <art27@cantab.net>
* | Merge pull request #761 from liwenqiu/parse-commit-encoding-headerPaulo Gomes2023-10-042-4/+25
|\ \ | |/ |/| plumbing: parse the encoding header of the commit object
| * plumbing: parse the encoding header of the commit objectliwenqiu2023-10-042-4/+25
| | | | | | | | other part can re-code the commit message according to the encoding to this encoding info
* | Merge pull request #855 from 0x34d/fuzzingPaulo Gomes2023-10-036-0/+66
|\ \ | |/ |/| fuzzing : fuzz testing support for oss-fuzz integration
| * fuzzing : fuzz testing support for oss-fuzz integrationArjun Singh2023-10-026-0/+66
| | | | | | | | Signed-off-by: Arjun Singh <ajsinghyadav00@gmail.com>
* | plumbing: commitgraph, allow SHA256 commit-graphsAndrew Thornton2023-09-302-13/+31
|/ | | | | | | | Since the build-tag sha256 was introduced the commit graph code should be switched to use hash.Size and only use a graph if it has the correct hash version for the version of go-git that is built. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Merge pull request #836 from hezhizhen/typoPaulo Gomes2023-09-288-252/+252
|\ | | | | *: fix some typos
| * *: fix some typosZhizhen He2023-09-088-252/+252
| | | | | | | | Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
* | plumbing/object: Support mergetag in merge commitsAditya Sirish2023-09-272-0/+83
|/ | | | | | | | When a merge commit is created from merging a signed tag, the tag object is embedded in the commit object. This commit adds support for this tag data when encoding and decoding a commit object. Signed-off-by: Aditya Sirish <aditya@saky.in>
* plumbing: Do not swallow http message coming from VCS providers.matej.risek2023-09-054-4/+35
| | | | | | For diagnostics reasons we want to surface error messages coming from VCS providers. That's why we introduce the reason field to Err struct in http package. This field can be used by an end user of the library in order to better understand failures.
* plumbing: transport, handle IPv6 while parsing endpoint. Fixes #740merlin2023-07-262-1/+19
|
* *: Handle paths starting with ~usernameArieh Schneier2023-07-091-16/+2
| | | | Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
* plumbing: blame, Complete rewrite. Fixes #603Arieh Schneier2023-07-062-0/+81
| | | | Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
* plumbing: packp, A request is not empty if it contains shallows. Fixes #328Arieh Schneier2023-07-023-4/+11
| | | | Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
* plumbing: http, Fix empty repos on Git v2.41+Paulo Gomes2023-07-013-0/+22
| | | | | | | | | | | | Git v2.41.0 comes with [changes](https://github.com/git/git/commit/933e3a4ee205353d8f093d5dfcd226fa432c4e58) that breaks go-git's assumptions for when detecting empty repositories. Go-git expects a flush instead of the first hash line. Instead, a dummy capabilities^{} with zero-id is returned. The change aims to allow for identifying the object format even when cloning empty repositories. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* plumbing: gitignore, Allow gitconfig to contain a gitignore relative to any ↵Arieh Schneier2023-06-052-11/+57
| | | | | | user home. Fixes #578 Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
* plumbing: gitignore, fix incorrect parsing. Fixes #500Arieh Schneier2023-05-292-6/+40
| | | | Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
* plumbing: gitignore, TypoJleagle2023-05-251-1/+1
| | | Co-authored-by: Paulo Gomes <paulo.gomes.uk@gmail.com>
* plumbing: gitignore, Allow gitconfig to contain a gitignore relative to user ↵Jleagle2023-05-252-0/+47
| | | | home
* git: enable fetch with unqualified referencesArieh Schneier2023-05-251-3/+4
| | | | Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
* Merge pull request #764 from techknowlogick/init-optionsPaulo Gomes2023-05-231-0/+1
|\ | | | | git: Allow Initial Branch to be configurable
| * git: Allow Initial Branch to be configurabletechknowlogick2023-05-211-0/+1
| |
* | *: Add missing error checksPaulo Gomes2023-05-112-14/+24
| | | | | | | | | | | | | | | | Some areas of the code base were missing error checks, without them it may be harder to troubleshoot unexpected behaviours. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* | *: Replace fmt.Sprintf with net.JoinHostPortPaulo Gomes2023-05-112-4/+5
| | | | | | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* | *: Remove use of deprecated io/utilPaulo Gomes2023-05-1132-93/+66
| | | | | | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* | *: Remove redudant err nil checksPaulo Gomes2023-05-113-13/+3
|/ | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* plumbing: transport/http, add support for custom proxy URLsSanskar Jaiswal2023-05-047-1/+307
| | | | | | | | | | | | | | 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-046-45/+230
| | | | | | | | | | | | | 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-041-0/+31
| | | | Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
* Merge pull request #743 from fcharlie/improve-packed-refsPaulo Gomes2023-04-261-1/+1
|\ | | | | storage: filesystem/dotgit, Improve load packed-refs
| * storage: filesystem/dotgit, Improve load packed-refsForce Charlie2023-04-251-1/+1
| |
* | Merge pull request #715 from jotadrilo/fix/csp-likePaulo Gomes2023-04-171-4/+16
|\ \ | |/ |/| internal: Fix regression in scp-like match
| * internal: Fix regression in csp-like matchJoseda Rios2023-04-151-4/+16
| | | | | | | | Signed-off-by: Joseda Rios <josriolop@gmail.com>
* | Merge pull request #707 from pjbgf/experimental-sha256Paulo Gomes2023-04-1115-31/+117
|\ \ | | | | | | *: Add support for initializing SHA256 repositories
| * | *: Support variable length plumbing.HashPaulo Gomes2023-03-0811-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-081-0/+53
| | | | | | | | | | | | | | | | | | 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>
* / plumbing: resolve non-external delta referencesZauberNerd2023-03-232-0/+22
|/ | | | | | | | | | | 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 #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 #682 from ThinkChaos/fix/transport-empty-unknown-errPaulo Gomes2023-03-022-1/+15
|\ \ | | | | | | fix: don't use the `firstErrLine` when it is empty
| * | fix: don't use the `firstErrLine` when it is emptyThinkChaos2023-02-212-1/+15
| |/ | | | | | | | | Returning `nil` causes `handleAdvRefDecodeError` to fall back to `io.ErrUnexpectedEOF`.