| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Now dotgit.PackWriter uses the new packfile.Parser and index.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
|
|
| |
Index is also automatically generated when OnFooter is called.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
|
|
|
| |
This functionality may be moved elsewhere in the future but is needed
now to fit filesystem.ObjectStorage and the new index.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
| |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
| |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
| |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
| |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
|
|
|
|
|
| |
It's still not complete:
* 64 bit offsets
* IdxChecksum
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
|
|
|
| |
In one case it disables the cache and the other disables lookup when
the scanner is not seekable. Could be added back later.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
| |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|\
| |
| | |
plumbing/format/idxfile: add new Index and MemoryIndex
|
|/
|
|
| |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
|\
| |
| | |
git: fix documentation for Notes
|
| |
| |
| |
| |
| |
| | |
It previously said that it returned all references that are branches, but that's not true.
Signed-off-by: Morgan Bazalgette <the@howl.moe>
|
|\ \
| | |
| | | |
plumbing: object, return ErrFileNotFound in FindEntry. Fixes #883
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
|\ \ \
| | | |
| | | | |
plumbing/transport/internal: common, support Gogs for ErrRepositoryNotFound
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
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>
|
|\ \ \
| | | |
| | | | |
plumbing: add context to allow cancel on diff/patch computing
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Marc Barussaud <marc.barussaud@orange.com>
|
|\ \ \ \
| |_|/ /
|/| | | |
storage/filesystem: avoid norwfs build flag
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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>
|
|\ \ \ \
| |_|/ /
|/| | | |
utils: diff, skip useless rune->string conversion
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
|\ \ \
| |/ /
|/| | |
Remote.Fetch: error on missing remote reference
|
| |/
| |
| |
| | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|\ \
| |/
|/| |
packfile: optimise NewIndexFromIdxFile for a very common case
|
|/
|
|
|
|
|
| |
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>
|
|\
| |
| | |
plumbing/transport: http, Adds token authentication support [Fixes #858]
|
| |
| |
| |
| | |
Signed-off-by: Eric Billingsley <ebilling@babrains.com>
|
|\ \
| |/
|/| |
storage: filesystem, make ObjectStorage constructor public
|
|/
|
|
| |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
|\
| |
| | |
plumbing: packfile, Don't copy empty objects. Fixes #840
|
|/
|
|
| |
Signed-off-by: kuba-- <kuba@sourced.tech>
|
|\
| |
| | |
plumbing: object, adds tree path cache to trees. Fixes #793
|
|/
|
|
|
|
| |
The cache is used in Tree.FindEntry for faster path search.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|\
| |
| | |
packfile: improve Index memory representation to be more compact
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \
| | |
| | | |
config: modules, worktree: Submodule fixes for 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/10ecfa76491e4923988337b2e2243b05376b40de
Signed-off-by: Joseph Vusich <jvusich@amazon.com>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \
| | |
| | | |
dotgit: Move package outside internal.
|
| | |
| | |
| | |
| | | |
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
|
|/ /
| |
| |
| | |
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
|
|\ \
| |/
|/| |
idxfile: optimise allocations in readObjectNames
|
|/
|
|
|
|
|
| |
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>
|
|\
| |
| | |
git: remote, Do not iterate all references on update.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|