| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
|\
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
| |
Signed-off-by: Marc Barussaud <marc.barussaud@orange.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Eric Billingsley <ebilling@babrains.com>
|
|
|
|
| |
Signed-off-by: kuba-- <kuba@sourced.tech>
|
|
|
|
|
|
| |
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>
|
| |
| |
| |
| | |
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
|
|/
|
|
|
|
|
| |
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>
|
|
|
| |
Worktree: Provide ability to add excludes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The canonical Git client successfully decodes sideband packets up to
65524 bytes in length (4-byte header + 65520-byte payload). The Git
protocol documentation was updated in August 2016 to reduce the maximum
payload size to 65516 bytes, however old implementations still exist in
the wild emitting 65520-byte payloads.
As there is no technical difficulty with accepting (not emitting) larger
payload sizes, this change adjusts the limit check to allow successful
decoding of packets up to 65524 bytes. This change increases
compatibility with the current canonical Git implementation.
Doc changes from August 2016:
https://github.com/git/git/commit/7841c4801ce51f1f62d376d164372e8677c6bc94#diff-52695c8fe91b78b70cea44562ae28297L67
Current packet buffer size is still LARGE_PACKET_MAX (+1 null):
https://github.com/git/git/blob/468165c1d8a442994a825f3684528361727cd8c0/sideband.c#L24
https://github.com/git/git/blob/468165c1d8a442994a825f3684528361727cd8c0/sideband.c#L36
LARGE_PACKET_MAX definition:
https://github.com/git/git/blob/468165c1d8a442994a825f3684528361727cd8c0/pkt-line.h#L100
Signed-off-by: Joseph Vusich <jvusich@amazon.com>
|
|\
| |
| | |
Resolve HEAD if symRefs capability is not supported
|
| |
| |
| |
| | |
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some tests write to an already existent repository retrieved from
fixtures. The permissions of these files are read only and make
receive pack fail. This was shadowed before as close errors were
lost.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|/
|
|
|
|
|
|
| |
Previously some close errors were losts. This is specially problematic
in go-git as lots of work is done here like generating indexes and
moving packfiles.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|
|
|
| |
Signed-off-by: Saeed Rasooli <saeed.gnu@gmail.com>
|
|
|
|
|
|
| |
Order=LogOrderBSF
Signed-off-by: Saeed Rasooli <saeed.gnu@gmail.com>
|
|\
| |
| | |
plubming: transport, Escape the user and pswd for endpoint. Fixes #723
|
| |
| |
| |
| | |
Signed-off-by: Zachary Romero <zacromero3@gmail.com>
|
|\ \
| | |
| | | |
Unused params, unused code, make Go tip's vet happy
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| |/
| |
| |
| | |
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
|
|\ \
| | |
| | | |
new methods Worktree.[AddGlob|RemoveBlob] and recursive Worktree.[Add|Remove]
|
| | |
| | |
| | |
| | | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| |/
|/|
| |
| |
| |
| | |
* 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>
|
|\ \
| | |
| | | |
plumbing: diff, fix crash when a small ending equal-chunk
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
this reuses an existing patch, setting context to 6 triggers the
bug, becuase of a 5-line trailing equals chunk.
Signed-off-by: Mechiel Lukkien <mechiel@ueber.net>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Mechiel Lukkien <mechiel@ueber.net>
|
|\ \ \
| |/ /
|/| | |
transport: http, fix services redirecting only info/refs
|
| |/
| |
| |
| | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In some cases the original data is not saved before it is cleaned
and forces a panic when it's needed.
The change adds ObjectToPack.CleanOriginal to be used to clean original
object instead of:
object.Original = nil
Now when the Original data is freed because it's no longer in the pack
window a SetOriginal call is done to make sure that Size, Hash and Size
data is not lost.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|/
|
|
| |
Signed-off-by: Dmitry Labutin <dmitry@labutin.com>
|
|\
| |
| | |
plumbing: format/packfile, fix crash with cycle deltas
|