| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
This PR adds in support for generation v2 support and a couple of new
walkers to match --date-order etc options on log. This PR also fixes a
bug in the chain code and adds more tests.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|\
| |
| | |
Improve handling of remote errors
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of simply returning the first line that the remote returned,
go-git now actively searches all of stderr for lines that may contain
a more actionable error message and returns that.
In addition, this change adds a case to map the GitLab-specific error
message to an ErrRepositoryNotFound error.
Signed-off-by: Max Jonas Werner <mail@makk.es>
|
|\ \
| | |
| | | |
plumbing: protocol/packp, Add validation for decodeLine
|
| |/
| |
| |
| | |
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|\ \
| | |
| | | |
add clone --shared feature
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
Unfortunately the original variant makes some incorrect typing
assumptions about commit-graphs which make handling graph chains
difficult to do correctly. This creates a new subpackage and deprecates
the old one. It then adds support commit graph chains.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|\ \
| |/
|/| |
plumbing: parse the encoding header of the commit object
|
| |
| |
| |
| | |
other part can re-code the commit message according to the encoding to this encoding info
|
|\ \
| |/
|/| |
fuzzing : fuzz testing support for oss-fuzz integration
|
| |
| |
| |
| | |
Signed-off-by: Arjun Singh <ajsinghyadav00@gmail.com>
|
|/
|
|
|
|
|
|
| |
Since the build-tag sha256 was introduced the commit graph code should
be switched to use hash.Size and only use a graph if it has the correct
hash version for the version of go-git that is built.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|\
| |
| | |
*: fix some typos
|
| |
| |
| |
| | |
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
|
|/
|
|
|
|
|
|
| |
When a merge commit is created from merging a signed tag, the tag object
is embedded in the commit object. This commit adds support for this tag
data when encoding and decoding a commit object.
Signed-off-by: Aditya Sirish <aditya@saky.in>
|
|
|
|
|
|
| |
For diagnostics reasons we want to surface error messages coming from VCS providers.
That's why we introduce the reason field to Err struct in http package.
This field can be used by an end user of the library in order to better understand failures.
|
| |
|
|
|
|
| |
Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
|
|
|
|
| |
Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
|
|
|
|
| |
Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Git v2.41.0 comes with [changes](https://github.com/git/git/commit/933e3a4ee205353d8f093d5dfcd226fa432c4e58)
that breaks go-git's assumptions for when detecting empty repositories.
Go-git expects a flush instead of the first hash line. Instead, a dummy capabilities^{}
with zero-id is returned. The change aims to allow for identifying
the object format even when cloning empty
repositories.
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|
|
|
|
|
| |
user home. Fixes #578
Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
|
|
|
|
| |
Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
|
|
|
| |
Co-authored-by: Paulo Gomes <paulo.gomes.uk@gmail.com>
|
|
|
|
| |
home
|
|
|
|
| |
Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
|
|\
| |
| | |
git: Allow Initial Branch to be configurable
|
| | |
|