aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #896 from erizocosmico/feature/new-index-decoderMiguel Molina2018-07-2610-387/+484
|\ | | | | plumbing/format/idxfile: add new Index and MemoryIndex
| * plumbing/format/idxfile: add new Index and MemoryIndexMiguel Molina2018-07-1910-387/+484
|/ | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* Merge pull request #862 from thehowl/patch-1Máximo Cuadros2018-07-161-1/+2
|\ | | | | git: fix documentation for Notes
| * Fix documentation for NotesMorgan2018-06-161-1/+2
| | | | | | | | | | | | It previously said that it returned all references that are branches, but that's not true. Signed-off-by: Morgan Bazalgette <the@howl.moe>
* | Merge pull request #885 from jsravn/findentry-return-file-not-foundMáximo Cuadros2018-07-162-3/+8
|\ \ | | | | | | plumbing: object, return ErrFileNotFound in FindEntry. Fixes #883
| * | plumbing: object, expose ErrEntryNotFound in FindEntry. Fixes #883James Ravn2018-07-102-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | FindEntry will return ErrDirNotFound if the directory doesn't exist. But it doesn't return a public error if the entry itself is missing. This exposes the internal error ErrEntryNotFound, so users can programmatically check for this condition. Signed-off-by: James Ravn <james@r-vn.org>
* | | Merge pull request #888 from jeromedoucet/tech/add_gog_repository_not_foundMáximo Cuadros2018-07-162-0/+83
|\ \ \ | | | | | | | | plumbing/transport/internal: common, support Gogs for ErrRepositoryNotFound
| * | | plumbing/transport/internal: common, add support of Gogs for ↵Jerome Doucet2018-07-142-0/+83
|/ / / | | | | | | | | | | | | | | | ErrRepositoryNotFound, avoiding to get an 'unknown error: '. Add some tests for existing supported services (github, gitlab, etc...) too. Signed-off-by: Jerome Doucet <jerdct@gmail.com>
* | | Merge pull request #874 from smola/patchcontextv4.5.0Máximo Cuadros2018-07-109-9/+297
|\ \ \ | | | | | | | | plumbing: add context to allow cancel on diff/patch computing
| * | | plumbing: add context to allow cancel on diff/patch computingMarc Barussaud2018-07-029-9/+297
| | | | | | | | | | | | | | | | Signed-off-by: Marc Barussaud <marc.barussaud@orange.com>
* | | | Merge pull request #864 from smola/no-norwfsMáximo Cuadros2018-07-065-94/+82
|\ \ \ \ | |_|/ / |/| | | storage/filesystem: avoid norwfs build flag
| * | | storage/filesystem: avoid norwfs build flagSantiago M. Mola2018-06-215-94/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | norwfs build flag was used to work on filesystems that do not support neither opening a file in read/write mode or renaming a file (e.f. sivafs). This had two problems: - go-git could not be compiled to work properly both with regular filesystems and limited filesystems at the same time. - the norwfs trick was not available on Windows. This PR removes the norwfs build flag, as well as the windows conditional flag on the dotgit package. For the file open mode, we use the new billy capabilities, to check at runtime if the filesystem supports opening a file in read/write mode or not. For the renaming, we just try and fallback to alternative methods if billy.ErrNotSupported is returned. Signed-off-by: Santiago M. Mola <santi@mola.io>
* | | | Merge pull request #873 from smola/fix-diffMáximo Cuadros2018-06-271-2/+2
|\ \ \ \ | |_|/ / |/| | | utils: diff, skip useless rune->string conversion
| * | | utils: diff, skip useless rune->string conversionMarc Barussaud2018-06-261-2/+2
|/ / / | | | | | | | | | | | | | | | | | | According to library documentation : https://github.com/sergi/go-diff/blob/master/diffmatchpatch/diff.go#L391 Signed-off-by: Marc Barussaud <marc.barussaud@orange.com>
* | | Merge pull request #870 from mcuadros/fetch-errorMáximo Cuadros2018-06-262-5/+49
|\ \ \ | |/ / |/| | Remote.Fetch: error on missing remote reference
| * | Remote.Fetch: error on missing remote referenceMáximo Cuadros2018-06-212-5/+49
| |/ | | | | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* | Merge pull request #869 from dsymonds/compactMáximo Cuadros2018-06-211-2/+12
|\ \ | |/ |/| packfile: optimise NewIndexFromIdxFile for a very common case
| * packfile: optimise NewIndexFromIdxFile for a very common caseDavid Symonds2018-06-211-2/+12
|/ | | | | | | Loading from an on-disk idxfile will usually already have the idxfile entries in order, so check that before wasting time on sorting. Signed-off-by: David Symonds <dsymonds@golang.org>
* Merge pull request #859 from ebilling/fix-858/token-authenticationMáximo Cuadros2018-06-113-1/+39
|\ | | | | plumbing/transport: http, Adds token authentication support [Fixes #858]
| * plumbing/transport: http, Adds token authentication support [Fixes #858]Eric Billingsley2018-06-083-1/+39
| | | | | | | | Signed-off-by: Eric Billingsley <ebilling@babrains.com>
* | Merge pull request #857 from erizocosmico/feature/object-storage-publicMáximo Cuadros2018-06-113-8/+9
|\ \ | |/ |/| storage: filesystem, make ObjectStorage constructor public
| * storage: filesystem, make ObjectStorage constructor publicMiguel Molina2018-06-083-8/+9
|/ | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* Merge pull request #856 from kuba--/fix-840/corrupted-objectsv4.4.1Máximo Cuadros2018-06-082-4/+19
|\ | | | | plumbing: packfile, Don't copy empty objects. Fixes #840
| * plumbing: packfile, Don't push empty objects. Fixes #840kuba--2018-06-072-4/+19
|/ | | | Signed-off-by: kuba-- <kuba@sourced.tech>
* Merge pull request #855 from jfontan/improvement/cache-tree-findentryMáximo Cuadros2018-06-071-1/+26
|\ | | | | plumbing: object, adds tree path cache to trees. Fixes #793
| * plumbing: object, adds tree path cache to trees. Fixes #793Javi Fontan2018-06-061-1/+26
|/ | | | | | The cache is used in Tree.FindEntry for faster path search. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Merge pull request #846 from dsymonds/compactMáximo Cuadros2018-06-062-23/+67
|\ | | | | packfile: improve Index memory representation to be more compact
| * packfile: improve Index memory representation to be more compactDavid Symonds2018-05-302-23/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using a map for offset indexing, use a sorted slice. Binary searching is fast, and a slice is much more compact. This has a negligible hit on speed, but has a significant impact on memory usage, especially for larger repos. benchmark old ns/op new ns/op delta BenchmarkIndexConstruction-12 15506506 14056098 -9.35% benchmark old allocs new allocs delta BenchmarkIndexConstruction-12 60764 60385 -0.62% benchmark old bytes new bytes delta BenchmarkIndexConstruction-12 4318145 3913169 -9.38% Signed-off-by: David Symonds <dsymonds@golang.org>
* | Merge pull request #848 from josephvusich/fix/cve-2018-11235Máximo Cuadros2018-06-065-12/+73
|\ \ | | | | | | config: modules, worktree: Submodule fixes for CVE-2018-11235
| * | worktree: Don't allow .gitmodules to be a symlink. Fixes CVE-2018-11235Joseph Vusich2018-05-302-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | References: * https://blogs.msdn.microsoft.com/devops/2018/05/29/announcing-the-may-2018-git-security-vulnerability/ * https://security-tracker.debian.org/tracker/CVE-2018-11235 * https://github.com/git/git/commit/10ecfa76491e4923988337b2e2243b05376b40de Signed-off-by: Joseph Vusich <jvusich@amazon.com>
| * | config: modules, Ignore submodules with dotdot '..' path components. Fixes ↵Joseph Vusich2018-05-303-12/+46
| |/ | | | | | | | | | | | | | | | | | | | | CVE-2018-11235 References: * https://blogs.msdn.microsoft.com/devops/2018/05/29/announcing-the-may-2018-git-security-vulnerability/ * https://security-tracker.debian.org/tracker/CVE-2018-11235 * https://github.com/git/git/commit/0383bbb9015898cbc79abd7b64316484d7713b44 Signed-off-by: Joseph Vusich <jvusich@amazon.com>
* | Merge pull request #854 from ajnavarro/dotgit-not-internalMáximo Cuadros2018-06-0619-10/+9
|\ \ | | | | | | dotgit: Move package outside internal.
| * | Remove printlnAntonio Jesus Navarro Perez2018-06-051-1/+0
| | | | | | | | | | | | Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
| * | dotgit: Move package outside internal.Antonio Jesus Navarro Perez2018-06-0518-9/+9
|/ / | | | | | | Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
* | Merge pull request #845 from dsymonds/masterMáximo Cuadros2018-06-051-4/+4
|\ \ | |/ |/| idxfile: optimise allocations in readObjectNames
| * idxfile: optimise allocations in readObjectNamesDavid Symonds2018-05-301-4/+4
|/ | | | | | | This makes all the required Entry allocations in one go, instead of huge amounts of small individual allocations. Signed-off-by: David Symonds <dsymonds@golang.org>
* Merge pull request #833 from jfontan/slow-reference-updatev4.4.0Máximo Cuadros2018-05-161-2/+22
|\ | | | | git: remote, Do not iterate all references on update.
| * git: remote, Do not iterate all references on update.Javi Fontan2018-05-141-2/+22
|/ | | | | | | | | | | | | | | | | The current code iterates all the references in the remote to check if they match the refspec. This is OK when the refspec is a wildcard but is a waste of time when they are not. A hash with references is generated for fast access before starting the update and used only when the refspec is not a wildcard. In a repository with 7800 references this meant 7800 * 7800 checks. With the current code it took 8m30s to update the references. With the new code it takes less than 0.5s. References are already extensively tested in remote_test.go. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Worktree: Provide ability to add excludes (#825)Alan D. Cabrera2018-05-115-7/+285
| | | Worktree: Provide ability to add excludes
* travis: dropping 1.8.x support due to golang.org/x/crypto/ssh requirementMáximo Cuadros2018-05-021-1/+0
|
* Merge pull request #815 from kuba--/fix-worktree/814Máximo Cuadros2018-04-185-8/+62
|\ | | | | Fix for "Worktree Add function adds ".git" directory"
| * git: worktree, Skip special git directory. Fixes #814kuba--2018-04-185-8/+62
|/ | | | Signed-off-by: kuba-- <kuba@sourced.tech>
* Merge pull request #706 from antham/resolve-commit-sha1v4.3.1Máximo Cuadros2018-04-172-8/+33
|\ | | | | Resolve full commit sha
| * Resolve full commit sha to plumbing hashantham2018-04-162-8/+33
| | | | | | | | Signed-off-by: antham <hamonanth@gmail.com>
* | storage: filesystem, close shallow file when readMáximo Cuadros2018-04-171-0/+2
| | | | | | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* | Merge pull request #810 from jfontan/fix/update-shallowMáximo Cuadros2018-04-173-2/+132
|\ \ | | | | | | git: remote, Add shallow commits instead of substituting. Fixes #412
| * | git: remote, Add shallow commits instead of substituting. Fixes #412Javi Fontan2018-04-163-2/+132
| |/ | | | | | | | | | | | | | | | | | | updateShallow substituted the previous shallow list with the one returned by the UploadPackResponse. If the repository had previous shallow commits these are deleted from the list. This change adds the new shallow hashes to the old ones. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* | Merge pull request #807 from keybase/strib/src-d-ignore-non-hash-filesMáximo Cuadros2018-04-172-3/+23
|\ \ | | | | | | dotgit: ignore filenames that don't match a hash
| * | dotgit: add test for bad file in pack directoryJeremy Stribling2018-04-161-1/+13
| | | | | | | | | | | | | | | | | | | | | Suggested by mcuadros. Issue: src-d/go-git#807 Signed-off-by: Jeremy Stribling <strib@alum.mit.edu>
| * | dotgit: ignore filenames that don't match a hashJeremy Stribling2018-04-131-2/+10
| |/ | | | | | | | | | | | | For both packfiles and object files. Issue: keybase/client#11366 Signed-off-by: Jeremy Stribling <strib@alum.mit.edu>