aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/protocol/packp
Commit message (Collapse)AuthorAgeFilesLines
* Allow unsupported multi_ack capabilityPaulo Gomes2022-11-164-12/+41
| | | | | | | | | | | | | | | | | | | | Azure DevOps requires capabilities multi_ack / multi_ack_detailed, which are not fully implemented and by default are included in transport.UnsupportedCapabilities. The initial clone operations require a full download of the repository, and therefore those unsupported capabilities are not as crucial, so by removing them from that list allows for the first clone to work successfully. Additional fetches will yield issues, therefore to support that repository users have to work from a clean clone until those capabilities are fully supported. Commits and pushes back into the repository have also been tested and work fine. This change adds an example for cloning Azure DevOps repositories. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* plumbing: packp and server, Include the contents of ↵🚀 Steven Ewing 🌌2022-09-224-3/+38
| | | | `GO_GIT_USER_AGENT_EXTRA` as the git user agent. Fixes #529
* plumbing: packp, Avoid duplicate encoding when overriding a Capability ↵Tyler Christensen2022-05-012-1/+14
| | | | | | | | | value. (#521) Previously, calling `Set($CAPABILITY, ...)` on a `capability.List` where `$CAPABILITY` was already present would correctly replace the existing value of that capability, but would also result in that capability being listed twice in the internal `l.sort` slice. This manifested publicly when the `List` was encoded as the same capability appearing twice with the same value in the encoded output.
* plumbing: protocol/pakp, update agent Carlos Alexandro Becker2022-01-194-5/+5
| | | Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* Merge pull request #418 from abhinav/unusedMáximo Cuadros2021-12-103-6/+0
|\ | | | | Remove unused vars/types/funcs/fields
| * Remove unused variables/types/functionsAbhinav Gupta2021-11-273-6/+0
| | | | | | | | | | | | | | | | [staticcheck](https://staticcheck.io/) reported a number of unused fields, functions, types, and variables across the code. Where possible, use them (assert unchecked errors in tests, for example) and otherwise remove them.
* | Merge branch 'master' into jc-push-atomicMáximo Cuadros2021-12-101-3/+3
|\ \
| * | packp: Actions should have type ActionAbhinav Gupta2021-11-271-3/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per the [Go Spec](https://go.dev/ref/spec#Constant_declarations), the following yields the type `Action` for `Bar` and `Baz` only if there is no `=`. const ( Foo Action = ... Bar Baz ) The following has the type `Action` for the first item, but not the rest. Those are untyped constants of the corresponding type. const ( Foo Action = ... Bar = ... Baz = ... ) This means that `packp.{Update, Delete, Invalid}` are currently untyped string constants, and not `Action` constants as was intended here. This change fixes these.
* / Add Atomic to push optionsJohn Cai2021-11-031-0/+19
|/ | | | | | push --atomic allows a push to succeed or fail atomically. If one ref fails, the whole push fails. This commit allows the user to set Atomic as an option for a push.
* plumbing: packp, Add encoding for push-options. Fixes #268.Sören Bohn2021-10-263-1/+53
| | | | go-git: Add field `Options` to `PushOptions`, wire functionality.
* *: use go-billy instead of os callsMáximo Cuadros2021-05-023-146/+5
|
* 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
* Merge pull request #125 from cristaloleg/minor-linter-fixesMáximo Cuadros2020-07-161-4/+1
|\ | | | | *: minor linter fixes
| * Minor linter fixesOleg Kovalov2020-07-061-4/+1
| |
* | Use only one name for receiverOleg Kovalov2020-07-065-32/+32
|/
* fix goreportcard warningsOleg Kovalov2020-07-011-1/+1
|
* plumbing: transport, fix handling of empty adv-refs on upload-packMáximo Cuadros2020-04-072-9/+23
|
* *: migration from gopkg to go modulesMáximo Cuadros2020-03-1032-69/+69
|
* Fix typos in comments, variables and function namesOleksandr Redko2019-10-247-17/+17
| | | | Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
* *: avoid unnecessary conversionsChristian Muehlhaeuser2019-07-292-2/+2
| | | | | | | No need to convert these values, they're already of the right type. Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com> (cherry picked from commit a1d8a7ac8bd0e4aff0f27dbb8bb37b8bd13a1346)
* Resolve HEAD if symRefs capability is not supportedAntonio Jesus Navarro Perez2018-03-262-9/+172
| | | | Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
* all: simplificationferhat elmas2017-11-296-10/+10
| | | | | | | | | | - no length for map initialization - don't check for boolean/error return - don't format string - use string method of bytes buffer instead of converting bytes to string - use `strings.Contains` instead of `strings.Index` - use `bytes.Equal` instead of `bytes.Compare`
* examples,plumbing,utils: typo fixesferhat elmas2017-11-203-4/+4
|
* packp/capability: Skip argument validations for unknown capabilitiesOri Rawlings2017-10-233-11/+36
| | | | Fixes #623
* Add sideband support for pushOri Rawlings2017-09-011-0/+4
|
* packp: fixed encoding when HEAD is not a valid refManuel Carmona2017-08-182-38/+56
|
* Merge pull request #475 from mcuadros/fix-ackMáximo Cuadros2017-07-122-23/+42
|\ | | | | plumbing: protocol, fix handling multiple ACK on upload-pack and test…
| * plumbing: protocol, fix handling multiple ACK on upload-packMáximo Cuadros2017-07-122-23/+42
| |
* | Merge pull request #472 from smola/fix-caps-delete-refsMáximo Cuadros2017-07-111-0/+1
|\ \ | |/ |/| improve delete support on push
| * improve delete support on pushSantiago M. Mola2017-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * server: implement delete-refs and announce it. * remote: check if server announced delete-refs before trying to delete and fail fast if it does not. Note that the client does not need no send 'delete-refs' back to the server to be able to delete references: ``` delete-refs ----------- If the server sends back the 'delete-refs' capability, it means that it is capable of accepting a zero-id value as the target value of a reference update. It is not sent back by the client, it simply informs the client that it can be sent zero-id values to delete references. ``` So our server implementation does not check if the client sent delete-refs back, it just accepts deletes if it receives them.
* | plumbing: protocol, fix handling multiple ACK on upload-packMáximo Cuadros2017-07-084-17/+76
|/
* capability: accept unknown capabilities, fixes #450Santiago M. Mola2017-06-232-10/+6
| | | | | | | | | GitHub has started using a non-standard capability "early-capabilities" with agent=git/github-g3daa19f21. This is breaking all go-git operations on GitHub. This commit removes validation for known capabilities, so that we can use non-standard capabilities safely.
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-0732-68/+68
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* Remove TODOs from documentationAntonio Jesus Navarro Perez2017-02-282-2/+2
|
* package plumbing documentation improvements (#248)Máximo Cuadros2017-02-071-1/+2
|
* documentation changesMáximo Cuadros2017-01-312-3/+2
|
* new srcd.works/go-git.v4 pathMáximo Cuadros2017-01-3032-68/+68
|
* Fix some typos in plumbing docs (#244)Sergio Arbeo2017-01-301-4/+4
|
* Repository.Progress moved as a field in *Options (#237)Máximo Cuadros2017-01-302-7/+7
|
* transport/http: fix partial request with haves. Fix #216. (#221)Antonio Navarro Perez2017-01-252-4/+5
|
* server: add git server implementation (#190)Santiago M. Mola2017-01-048-2/+215
| | | | | | | | | | | | | | | * server: add generic server implementation (transport-independent), both for git-upload-pack and git-receive-pack. * server: move internal functions to internal/common. * cli: add git-receive-pack and git-upload-pack implementations. * format/packfile: add UpdateObjectStorage function, extracted from Remote. * transport: implement tranport RPC-like, only with git-upload-pack and git-receive-pack methods. Client renamed to Transport. * storer: add storer.Storer interface. * protocol/packp: add UploadPackResponse constructor with packfile. * protocol/packp: fix UploadPackResponse encoding, add tests. * protocol/packp/capability: implement All.
* remote: add Push (#178)Santiago M. Mola2016-12-192-15/+33
| | | | | | | | | | | | * remote: add Push. * add Push method to Remote. * add method Push to Repository. * examples: add push example. * requested changes * add tests, fixes
* protocol/packp: use ReferenceName type for Command.Name. (#187)Santiago M. Mola2016-12-154-24/+27
|
* transport: new git protocol (#175)Máximo Cuadros2016-12-124-5/+37
|
* transport: add git-send-pack support to local/ssh. (#163)Santiago M. Mola2016-12-0910-47/+229
| | | | | | | | | * protocol/packp: add Packfile field to ReferenceUpdateRequest. * protocol/packp: add NewReferenceUpdateRequestFromCapabilities. * NewReferenceUpdateRequestFromCapabilities can be used to create a ReferenceUpdateRequest with initial capabilities compatible with the server. * protocol/packp: fix new line handling on report status. * transport/file: test error on unexisting command.
* packp/capability: trim spaces on capabilities decode. (#170)Santiago M. Mola2016-12-092-0/+14
| | | | | | git 1.8 used to write a leading space in the capabilities announcement for git-receive-pack. We now trim spaces before decoding a capabilities list to be more tolerant about this kind of difference.
* remote: sideband support (#164)Máximo Cuadros2016-12-074-18/+29
| | | | | | * remote: sideband support * changes
* revision based on goreportcard.comMáximo Cuadros2016-12-066-11/+11
|
* protocol/packp: add report status message. (#162)Santiago M. Mola2016-12-064-4/+402
|
* protocol/packp: UploadPackResponse implementation (#161)Máximo Cuadros2016-12-0611-11/+446
| | | | | | | | | | | | | | | | * plumbing/protocol: paktp avoid duplication of haves, wants and shallow * protocol/pakp: UploadPackResponse implementation * changes * changes * changes * debug * changes