aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
Commit message (Collapse)AuthorAgeFilesLines
* transport: http, fixes random failing test, #644Máximo Cuadros2017-11-201-60/+52
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* Merge pull request #613 from darkowlzz/482-commit-statsMáximo Cuadros2017-11-083-0/+167
|\ | | | | Add Stats() to Commit
| * Add Stats() to Patch and fix diffstat outputSunny2017-11-023-53/+130
| |
| * Add Stats() to CommitSunny2017-11-022-0/+90
| | | | | | | | Stats() is similar to `git show --stat <hash>`.
* | Updating reference to the git object modelAntonio Troina2017-11-071-1/+1
|/
* Merge pull request #631 from keybase/strib/use-bytes-pool-for-diffsMáximo Cuadros2017-10-311-4/+13
|\ | | | | packfile: use buffer pool for diffs
| * packfile: use buffer pool for diffsJeremy Stribling2017-10-301-4/+13
| |
* | packfile: delete index maps from memory when no longer neededJeremy Stribling2017-10-301-0/+6
|/ | | | This helps keep memory usage stable while calculating deltas.
* Add support for signed commits (#616)Sunny2017-10-292-0/+69
| | | | | | | | | * Add support for signed commits This change adds `GPGSignature` field to `Commit` object. This is used to store the signature of the commit, if any. * Rename gpg to pgp
* packp/capability: Skip argument validations for unknown capabilitiesOri Rawlings2017-10-233-11/+36
| | | | Fixes #623
* 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.
* revlist: do not revisit ancestors as long as all branches are visitedMiguel Molina2017-09-122-3/+84
| | | | | | | | | | This change is the fixed version of the previous performance improvement that was reverted due to some bogus logic. Now it's fixed and only stops the iteration if and only if all of the branches we've come across have been visited, being a branch a parent commit of a commit we've visited. Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* Merge pull request #586 from keybase/strib/commit-preorder-seen-gh-masterMáximo Cuadros2017-09-123-11/+41
|\ | | | | plumbing: the commit walker can skip externally-seen commits
| * plumbing: the commit walker can skip externally-seen commitsJeremy Stribling2017-09-093-11/+41
| | | | | | | | | | | | | | | | | | | | When the revlist is computing the set of hashes needed to transfer, it doesn't need to walk over commits it has already processed. So, it can instruct the commit walker not to walk those commits by passing in its own `seen` map. For a 36K object repo, this brought the time for `revlist.Objects` down from 50s to 30s.
* | config: support a configurable, and turn-off-able, pack.windowJeremy Stribling2017-09-117-39/+92
|/ | | | | | | | | | | | | | | | | | | | 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).
* revert: revlist: do not revisit already visited ancestorsMiguel Molina2017-09-081-17/+3
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* plumbing/index: fix TestEncode in go 1.9Máximo Cuadros2017-09-071-1/+2
|
* packfile: small optimizations for findMatch and matchLengthMiguel Molina2017-09-072-16/+38
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* packfile: parallelize deltification of objects in groupsMiguel Molina2017-09-072-21/+31
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* packfile: use a modified version of JGit DeltaIndex and DeltaIndexScannerMiguel Molina2017-09-063-40/+286
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* packfile: slightly haster hash function for chunk-offset index keyMiguel Molina2017-09-062-11/+32
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* packfile: reuse delta indexes when possibleMiguel Molina2017-09-063-10/+22
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* revlist: do not visit again already visited parentsMiguel Molina2017-09-051-11/+38
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* packfile: improve performance a little by reducing gc pressureMiguel Molina2017-09-044-6/+33
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* Add sideband support for pushOri Rawlings2017-09-013-2/+33
|
* plumbing: use sliding window in delta calculations, like git CLJeremy Stribling2017-08-282-1/+23
| | | | | | | | | | This sets a default sliding window of 10 for the delta calculation, just like git CL: https://git-scm.com/docs/git-pack-objects#git-pack-objects---windowltngt For a big-ish repo with 35K objects (17K commits), this reduced the time for calling `deltaSelection.walk` during a push from more than 14 minutes to about a minute.
* Merge pull request #554 from strib/strib/fix-win-cmd-lookupMáximo Cuadros2017-08-282-2/+2
|\ | | | | plumbing: use LookPath instead of Stat to fix Windows executables
| * 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.
* | plumbing: use `seen` map in tree walkerJeremy Stribling2017-08-275-11/+43
|/ | | | | | | This helps avoids iterating down the same trees for every commit. For a big-ish repo with 35K objects (17K commits), this reduced the time for calling `revlist.Objects` during a push (with 0 hashes to ignore) from more than ten minutes to less than a minute.
* grammar correctionZach Gershman2017-08-241-1/+1
| | | *stopped instead of stop
* packp: fixed encoding when HEAD is not a valid refManuel Carmona2017-08-182-38/+56
|
* fix race condition on ObjectLRUMiguel Molina2017-08-112-0/+39
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* 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-074-1/+29
| | | | | | | | | | | | | | * 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"
* | Merge pull request #531 from mcuadros/ref-nameMáximo Cuadros2017-08-022-24/+24
|\ \ | | | | | | plumbing: moved `Reference.Is*` methods to `ReferenceName.Is*`
| * | plumbing: moved `Reference.Is*` methods to `ReferenceName.Is*`Máximo Cuadros2017-08-022-24/+24
| |/
* | Merge pull request #501 from smola/config-multiple-urlsMáximo Cuadros2017-08-025-13/+103
|\ \ | |/ |/| config: multiple values in RemoteConfig (URLs and Fetch)
| * config: preserve option order on config marshallingSantiago M. Mola2017-08-015-12/+71
| | | | | | | | | | Do not change order of options (e.g. in RemoteConfig) when serializing for any option whose value has not changed.
| * format/config: add GoStringSantiago M. Mola2017-08-012-1/+32
| | | | | | | | This is more convenient for testing and debugging.
* | transport: fix ssh override config, fixes #519v4.0.0-rc13Máximo Cuadros2017-07-282-5/+40
| |
* | Merge pull request #516 from smola/revlist-perfMáximo Cuadros2017-07-281-1/+28
|\ \ | | | | | | revlist: ignore all objects reachable from ignored objects
| * | revlist: ignore all objects reachable from ignored objectsSantiago M. Mola2017-07-271-1/+28
| | | | | | | | | | | | | | | | | | | | | Usually we call revlist.Objects ignoring a set of commits. This is not enough to ignore everything reachable from such set, so we first get all objects reachable from the ignored set and then walk the tree again ignoring that new set.
* | | plumbing: add IsDelta method to ObjectTypeSantiago M. Mola2017-07-272-6/+8
| | | | | | | | | | | | | | | ObjectType.IsDelta is a convenience function to match both offset and reference delta types.
* | | storage: reuse deltas from packfilesSantiago M. Mola2017-07-277-98/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * plumbing: add DeltaObject interface for EncodedObjects that are deltas and hold additional information about them, such as the hash of the base object. * plumbing/storer: add DeltaObjectStorer interface for object storers that can return DeltaObject. Note that calls to EncodedObject will never return instances of DeltaObject. That requires explicit calls to DeltaObject. * storage/filesystem: implement DeltaObjectStorer interface. * plumbing/packfile: packfile encoder now supports reusing deltas that are already computed (e.g. from an existing packfile) if the storage implements DeltaObjectStorer. Reusing deltas boosts performance of packfile generation (e.g. on push).