aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #762 from zkry/escape-basic-auth-user-pswdMáximo Cuadros2018-03-012-2/+12
|\ | | | | plubming: transport, Escape the user and pswd for endpoint. Fixes #723
| * plubming: transport, Escape the user and password for endpoint. Fixes #723Zachary Romero2018-02-282-2/+12
| | | | | | | | Signed-off-by: Zachary Romero <zacromero3@gmail.com>
* | Merge pull request #766 from mvdan/patchesMáximo Cuadros2018-03-012-22/+11
|\ \ | | | | | | Unused params, unused code, make Go tip's vet happy
| * | all: make the upcoming Go 1.11's vet happyDaniel Martí2018-03-011-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vet in 1.10 and earlier was buggy in how its "composite literal uses unkeyed fields" check had false negatives when it encountered a slice of pointer types that omitted each element's type. This has been fixed in tip, so adapt to that fix. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
| * | all: remove some unused codeDaniel Martí2018-03-011-11/+0
| |/ | | | | | | Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
* / Return error when creating public keys from invalid PEMMark DeLillo2018-02-252-0/+9
|/ | | | | | * pem.Decode will return nil in this case, and passing that to x509.IsEncryptedBlock will cause it to panic Signed-off-by: Mark DeLillo <github.med@delillo.org>
* Merge pull request #751 from mcuadros/redirectMáximo Cuadros2018-02-154-10/+56
|\ | | | | transport: http, fix services redirecting only info/refs
| * transport: http, fix services redirecting only info/refsMáximo Cuadros2018-02-144-10/+56
| | | | | | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* | Fix mistypingDmitry Labutin2018-02-071-2/+2
|/ | | | Signed-off-by: Dmitry Labutin <dmitry@labutin.com>
* gofmt -sMáximo Cuadros2018-01-251-2/+2
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* plumbing: transport ssh, ssh_config implementationMáximo Cuadros2017-12-112-12/+107
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* check .ssh/config for host and port overrides; fixes #629Robert Smith2017-12-091-0/+15
|
* all: gofmt -sferhat elmas2017-11-302-2/+2
|
* plumbing/transport: Fix truncated comment in EndpointOri Rawlings2017-11-271-1/+1
|
* Close http.Body reader when neededAntonio Jesus Navarro Perez2017-11-241-1/+3
| | | | If we don't do that, all the goroutines opened by the Body Reader are never closed, causing a 'fatal: morestack on g0' error.
* update to go-billy.v4 and go-git-fixtures.v3Máximo Cuadros2017-11-2314-20/+17
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: made public all the fields and standardize AuthMethodMáximo Cuadros2017-11-215-55/+59
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* *: add pointer to the new transport.Endpoint structMáximo Cuadros2017-11-2122-101/+82
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: converts Endpoint interface into a structMáximo Cuadros2017-11-212-167/+195
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: git and http, full mocked testsMáximo Cuadros2017-11-202-8/+7
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: git and http, full mocked testsMáximo Cuadros2017-11-206-243/+211
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: ssh, mocked SSH server, fixes #332Máximo Cuadros2017-11-201-16/+108
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: ssh, fixes override HostKeyCallback from DefaultClientMáximo Cuadros2017-11-202-4/+2
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: http, fixes random failing test, #644Máximo Cuadros2017-11-201-60/+52
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* Fixed SCP regexJ. Fernando Sánchez2017-09-282-2/+2
| | | | URLs should be user@server:port/path instead of user@server:port:path
* Adds port to SCP EndpointsJ. Fernando Sánchez2017-09-282-3/+23
| | | | | | The port for SCP-like URLs was hardcoded to 22. This commit modifies the regex to find a port (optional), and adds a new test case that covers this scenario.
* config: support a configurable, and turn-off-able, pack.windowJeremy Stribling2017-09-112-2/+3
| | | | | | | | | | | | | | | | | | | | One use of go-git is to transfer git data from a non-standard git repo (not stored in a file system, for example) to a "remote" backed by a standard, local .git repo. In this scenario, delta compression is not needed to reduce transfer time over the "network", because there is no network. The underlying storage layer has already taken care of the data tranfer, and sending the objects to local .git storage doesn't require compression. So this PR gives the user the option to turn off compression when it isn't needed. Of course, this results in a larger, uncompressed local .git repo, but the user can then run git gc or git repack on that repo if they care about the storage costs. Turning the pack window to 0 on reduces total push time of a 36K repo by 50 seconds (out of a pre-PR total of 3m26s).
* Add sideband support for pushOri Rawlings2017-09-012-2/+29
|
* plumbing: use LookPath instead of Stat to fix Windows executablesJeremy Stribling2017-08-272-2/+2
| | | | | | When git-core isn't in the user's PATH, we need to use `LookPath` to verify the existence of the executable, rather than `os.Stat`, so that on Windows it will search for files with executable suffixes.
* Merge pull request #540 from mcarmonaa/fix/git-transport-windows-testMáximo Cuadros2017-08-101-0/+6
|\ | | | | *: windows support, skipped receive_pack_test for git transport
| * skipped receive_pack_test for git transport in windowsManuel Carmona2017-08-101-0/+6
| |
* | Avoid using user.Current()Kim, Hirokuni2017-08-081-6/+20
|/ | | | | user.Current() causes 'Current not implemented' error when crosscompiled. See https://github.com/golang/go/issues/6376
* *: windows support, some more fixes (2) (#536)Manuel Carmona2017-08-073-1/+22
| | | | | | | | | | | | | | * fixed windows failed test: "143 FAIL: worktree_test.go:314: WorktreeSuite.TestFilenameNormalization" * fixed windows failed test: "489: FAIL: auth_method_test.go:106: SuiteCommon.TestNewSSHAgentAuthNoAgent" * fixed windows failed test: "279 FAIL: server_test.go:50: ServerSuite.TestClone" fixed windows failed test: "298 FAIL: server_test.go:37: ServerSuite.TestPush" * fixed windows failed test: "316 FAIL: <autogenerated>:26: UploadPackSuite.TearDownSuite" * fixed windows failed test: "FAIL: <autogenerated>:6: IndexSuite.TearDownSuite"
* Merge pull request #527 from strib/win-pack-cmdsMáximo Cuadros2017-08-042-2/+75
|\ | | | | plumbing: fix pack commands for the file client on Windows
| * plumbing: fix pack commands for the file client on WindowsJeremy Stribling2017-08-032-2/+75
| | | | | | | | | | | | The default git install on Windows doesn't come with commands for receive-pack and upload-pack in the default $PATH. Instead, use --exec-path to find pack executables in that case.
* | *: windows support, some more fixes (#533)Manuel Carmona2017-08-032-1/+2
|/ | | | | | | | | | * fixed windows failed test: "134 FAIL: repository_test.go:340: RepositorySuite.TestPlainOpenBareRelativeGitDirFileTrailingGarbage" * fixed windows failed test: "143 FAIL: worktree_test.go:367: WorktreeSuite.TestCheckoutIndexOS" * fixed windows failed test: "296 FAIL: receive_pack_test.go:36: ReceivePackSuite.TearDownTest" * fixed windows failed test: "152 FAIL: worktree_test.go:278: WorktreeSuite.TestCheckoutSymlink"
* transport: fix ssh override config, fixes #519v4.0.0-rc13Máximo Cuadros2017-07-282-5/+40
|
* transport: context package supportMáximo Cuadros2017-07-2511-39/+187
|
* plumbing: transport server, remove letfoverMáximo Cuadros2017-07-191-3/+0
|
* plumbing: transport git fix test on windowsMáximo Cuadros2017-07-181-1/+3
|
* plumbing: server, fix loader in windowsMáximo Cuadros2017-07-181-1/+4
|
* Merge pull request #476 from smola/server-as-clientMáximo Cuadros2017-07-113-7/+49
|\ | | | | transport/server: add asClient parameter
| * transport/server: add NewClientSantiago M. Mola2017-07-113-7/+49
| | | | | | | | | | | | server.NewClient returns a server that acts as a client. This makes it working seamlessly when registering a server directly with `client.InstallProtocol`.
* | improve delete support on pushSantiago M. Mola2017-07-113-37/+16
|/ | | | | | | | | | | | | | | | | | | | | | | * 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.
* transport/file: avoid race with Command.Wait, fixes #463Santiago M. Mola2017-07-071-4/+14
| | | | | | Pipe returned by Command.StderrPipe() has a race with Read and Command.Wait(). We use a io.Pipe() instead and ensure it is closed after Wait().
* transport/internal: read only first error lineSantiago M. Mola2017-07-071-17/+17
| | | | | | | We only use the first line of error output. So we use a channel with a single byte buffer and read the first line from stderr. Further output is discarded, as well as any further I/O error, which might be expected when closing the pipe (command finished).
* Merge pull request #423 from smola/ssh-optionsMáximo Cuadros2017-07-051-3/+36
|\ | | | | transport/ssh: allow passing SSH options
| * transport/ssh: allow global *ssh.ClientConfig overrideSantiago M. Mola2017-06-231-14/+31
| | | | | | | | | | A global *ssh.ClientConfig override can be set. It will be use to override values of each SSH session.
| * transport/ssh: allow passing SSH optionsSantiago M. Mola2017-06-231-3/+19
| | | | | | | | | | Adds the possibility of passing options to SSH transport. Options have the form of functions modifying ssh.ClientConfig.
* | fix auth error issueAntonio Jesus Navarro Perez2017-07-042-1/+7
| |