| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
plumbing: format/packfile, remove duplicate checks in findMatch()
|
| |
| |
| |
| | |
Co-authored-by: onee-only <kimww0306@gmail.com>
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
| |
skeema/knownhosts v1.3.0 introduced a HostKeyDB type that extends the HostKeyCallback functionality
to support @cert-authority algorithms.
`known_hosts` files may contain lines with @cert-authority markers to indicate that a line corresponds
to a certificate instead of a key. If a git remote uses cert authorities as the preferred host
identification mechanism, the functionality added in skeema/knownhosts v1.3.0 is needed so that go-git
can interact with this remote.
See https://github.com/skeema/knownhosts/pull/9 for details.
|
|\
| |
| | |
plumbing: gitignore, Fix loading of ignored .gitignore files.
|
| |
| |
| |
| |
| |
| |
| | |
Stop loading .gitignore files from ignored directories, as this can
cause files to be included that should not be.
See https://git-scm.com/docs/gitignore#_pattern_format
|
|/
|
|
| |
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|\
| |
| | |
Bumps Go versions and go-billy
|
| |
| |
| |
| | |
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|/ |
|
|
|
|
|
|
|
|
| |
Canonical Git implementation terminates the sideband stream with a
flush. If the demux scanner is not terminated, it can hang the
connection. Returns io.EOF when encountering a flush pkt.
https://github.com/git/git/blob/master/upload-pack.c#L460
|
|
|
| |
* plumbing: protocol/packp, client-side filter capability support
|
| |
|
| |
|
|
|
|
| |
hashes
|
| |
|
|
|
|
|
|
|
|
|
| |
Before this, go-git would prematurely bail out of extensions processing
when an unknown extension was encountered. This had two issues:
1. It did not account for mandatory (lower case header) extensions
2. It did not properly update the calculated hash, leading to an
"invalid checksum" error.
|
|
|
|
|
|
|
|
|
| |
Before this, go-git was relying on the peeked header to not include a valid
4 char string header. While doing this, it did not differentiate between
the errournously read final hash and an unknown extension.
This made it impossible to properly skip unknown optional extensions while
detecting EOF early enough.
|
|\
| |
| | |
Replace short field names with more descriptive ones.
|
| |
| |
| |
| |
| | |
The decision to change the name of these fields came from reading the code
further down in the scope and not being clear what `c.c` means.
|
|\ \
| | |
| | | |
chore: fix some comments
|
| | |
| | |
| | |
| | | |
Signed-off-by: avoidalone <wuguangdong@outlook.com>
|
|\ \ \
| |/ /
|/| | |
plumbing: no panic in printStats function. Fixes #177
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Fixes #191
|
| | |
| | |
| | |
| | | |
Fixes #1017
|
|/ / |
|
| | |
|
|\ \
| | |
| | | |
plumbing: object, enable renames in getFileStatsFromFilePatches
|
| |/
| |
| |
| |
| | |
Diff has handled renames by default since 2020. This change sets Name
for the renamed file in a manner similar to diffstat.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Check reference names format before creating branches/tags/remotes.
This should probably be in a lower level somewhere in `plumbing`.
Validating the names under `plumbing.NewReference*` is not possible
since these functions don't return errors.
Fixes: https://github.com/go-git/go-git/issues/929
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Error when encountering an error-line
See https://git-scm.com/docs/pack-protocol
Update plumbing/format/pktline/error.go
Co-authored-by: Paulo Gomes <paulo.gomes.uk@gmail.com>
Update plumbing/format/pktline/error.go
Co-authored-by: Paulo Gomes <paulo.gomes.uk@gmail.com>
feat: format newline
|
|/
|
|
|
|
| |
This the request used for the git transport protocol
feat: nil writer
|
|
|
|
|
|
|
|
|
| |
When running the tests in an install in which git daemon is not installed
(e.g. openSUSE), all the git transport tests will fail with a connection
refused error. This was due the git server not being running in the first
place. The tests will now fail with 'git daemon cannot be found'.
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|\
| |
| | |
plumbing: fix empty uploadpack request error
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we have all what we asked for, finish the session and handle error.
This is equivalent of git "Already up to date." message.
Fixes: https://github.com/go-git/go-git/issues/328
Fixes: https://github.com/go-git/go-git/issues/638
Fixes: https://github.com/go-git/go-git/issues/157
|
|/
|
|
|
|
|
| |
Without exposing `trace`, we can't set a target to enable tracing from
out of go-git.
Fixes: https://github.com/go-git/go-git/pull/916
|
| |
|
|
|
|
| |
ioutil.Pipe literally calls io.Pipe.
|
| |
|
|
|
|
|
|
| |
The changes aim to simplify the code and reduce duplication.
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|\
| |
| | |
plumbing: Optimise memory consumption for filesystem storage
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, as part of building the index representation, the resolveObject
func would create an interim plumbing.MemoryObject, which would then be
saved into storage via storage.SetEncodedObject. This meant that objects
would be unnecessarily loaded into memory, to then be saved into disk.
The changes streamlines this process by:
- Introducing the LazyObjectWriter interface which enables the write
operation to take places directly against the filesystem-based storage.
- Leverage multi-writers to process the input data once, while targeting
multiple writers (e.g. hasher and storage).
An additional change relates to the caching of object info children within
Parser.get. The cache is now skipped when a seekable filesystem is being
used.
The impact of the changes can be observed when using seekable filesystem
storages, especially when cloning large repositories.
The stats below were captured by adapting the BenchmarkPlainClone test
to clone https://github.com/torvalds/linux.git:
pkg: github.com/go-git/go-git/v5
cpu: Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz
│ /tmp/old │ /tmp/new │
│ sec/op │ sec/op vs base │
PlainClone-16 41.68 ± 17% 48.04 ± 9% +15.27% (p=0.015 n=6)
│ /tmp/old │ /tmp/new │
│ B/op │ B/op vs base │
PlainClone-16 1127.8Mi ± 7% 256.7Mi ± 50% -77.23% (p=0.002 n=6)
│ /tmp/old │ /tmp/new │
│ allocs/op │ allocs/op vs base │
PlainClone-16 3.125M ± 0% 3.800M ± 0% +21.60% (p=0.002 n=6)
Notice that on average the memory consumption per operation is over 75%
smaller. The time per operation increased by 15%, which may actual be less
on long running applications, due to the decreased GC pressure and the
garbage collection costs.
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds UpdateServerInfo along with a new go-git command to generate
info files to help git dumb http serve refs and their objects.
This also updates the docs to reflect this.
Docs: https://git-scm.com/docs/git-update-server-info
Fixes: https://github.com/go-git/go-git/issues/731
|
|/
|
|
|
|
| |
unreachable proxy server is set. Fixes #900
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
|