| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Our standard error messages begin with a lower case letter so that they
can be prefixed or embedded nicely.
These error messages were missed during the standardization pass since
they use the `tree_error` helper function.
|
|\
| |
| | |
Support using notes via a commit rather than a ref
|
| | |
|
| | |
|
| |
| |
| |
| | |
This also adds tests for this function.
|
| |
| |
| |
| | |
This also adds tests for this function.
|
| |
| |
| |
| | |
This also adds tests for this function.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds a new function that will allow creation of notes without
necessarily updating a particular ref, the notes tree is obtained
from the git_commit object parameter, a new commit object pointing
to the current tip of the notes tree is optionally returned
via the 'note_commit_out' parameter,
optionally the blob id for the note is returned through
the 'note_blob_out' object.
|
| |
| |
| |
| |
| | |
For the new 'commit' API it will be necessary to know the OID
of the notes commit that was written as well as the OID of the notes blob.
|
|\ \
| | |
| | | |
Transfer fewer objects on push and local fetch
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Hide all local refs in the revwalk.
Packbuilder should not add hidden trees or blobs.
|
|\ \ \
| | | |
| | | | |
refs: traverse symlinked directories
|
| | | |
| | | |
| | | |
| | | | |
Ensure that we can recurse into directories via symbolic links.
|
| | | |
| | | |
| | | |
| | | | |
Perform some error checking when examining symlink directories.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Native Git allows symlinked directories under .git/refs. This
change allows libgit2 to also look for references that live under
symlinked directories.
Signed-off-by: Andy Doan <andy@opensourcefoundries.com>
|
|\ \ \ \
| |/ / /
|/| | | |
Inflate large loose blobs
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Writing very large files may be slow, particularly on inefficient
filesystems and when running instrumented code to detect invalid memory
accesses (eg within valgrind or similar tools).
Introduce `GITTEST_SLOW` so that tests that are slow can be skipped by
the CI system.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Teach the CommonCrypto hash mechanisms to support large files. The hash
primitives take a `CC_LONG` (aka `uint32_t`) at a time. So loop to give
the hash function at most an unsigned 32 bit's worth of bytes until we
have hashed the entire file.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Teach the win32 hash mechanisms to support large files. The hash
primitives take at most `ULONG_MAX` bytes at a time. Loop, giving the
hash function the maximum supported number of bytes, until we have
hashed the entire file.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Check the size of objects being read from the loose odb backend and
reject those that would not fit in memory with an error message that
reflects the actual problem, instead of error'ing later with an
unintuitive error message regarding truncation or invalid hashes.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead of paging to zlib in INT_MAX sized chunks, we can give it
as many as UINT_MAX bytes at a time. zlib doesn't care how big
a buffer we give it, this simply results in fewer calls into zlib.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
zlib will only inflate/deflate an `int`s worth of data at a time.
We need to loop through large files in order to ensure that we inflate
the entire file, not just an `int`s worth of data. Thankfully, we
already have this loop in our `git_zstream` layer. Handle large objects
using the `git_zstream`.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Introduce an internal API to get the object type based on a
length-specified (not null terminated) string representation. This can
be used to compare the (space terminated) object type name in a loose
object.
Reimplement `git_object_string2type` based on this API.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Introduce a test for very large objects in the ODB. Write a large
object (5 GB) and ensure that the write succeeds and provides us the
expected object ID. Introduce a test that writes that file and
ensures that we can subsequently read it.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Introduce `git_prefixncmp` that will search up to the first `n`
characters of a string to see if it is prefixed by another string.
This is useful for examining if a non-null terminated character
array is prefixed by a particular substring.
Consolidate the various implementations of `git__prefixcmp` around a
single core implementation and add some test cases to validate its
behavior.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
zlib will return `Z_BUF_ERROR` whenever there is more input to inflate
or deflate than there is output to store the result. This is normal for
us as we iterate through the input, particularly with very large input
buffers.
|
|\ \ \ \
| | | | |
| | | | | |
FETCH_HEAD and multiple refspecs
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We treat each refspec on its own, but the code currently overwrites the contents
of FETCH_HEAD so we end up with the entries for the last refspec we processed.
Instead, truncate it before performing the updates and append to it when
updating the references.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We want to do this in order to get FETCH_HEAD to be empty when we start updating
it due to fetching from the remote.
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
patch_parse: fix parsing unquoted filenames with spaces
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The git patch format allows for having unquoted paths with whitespaces
inside. This format becomes ambiguous to parse, e.g. in the following
example:
diff --git a/file b/with spaces.txt b/file b/with spaces.txt
While we cannot parse this in a correct way, we can instead use the
"---" and "+++" lines to retrieve the file names, as the path is not
followed by anything here but spans the complete remaining line. Because
of this, we can simply bail outwhen parsing the "diff --git" header here
without an actual error and then proceed to just take the paths from the
other headers.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When parsing the "---" and "+++" line, we stop after the first
whitespace inside of the filename. But as files containing whitespaces
do not need to be quoted, we should instead use the complete line here.
This fixes parsing patches with unquoted paths with whitespaces.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix unpack double free
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If an element has been cached, but then the call to
packfile_unpack_compressed() fails, the very next thing that happens is
that its data is freed and then the element is not removed from the
cache, which frees the data again.
This change sets obj->data to NULL to avoid the double-free. It also
stops trying to resolve deltas after two continuous failed rounds of
resolution, and adds a test for this.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Free OpenSSL peer certificate
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Per SSL_get_peer_certificate docs:
```
The reference count of the X509 object is incremented by one, so that it will not be destroyed when the session containing the peer certificate is freed. The X509 object must be explicitly freed using X509_free().
```
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This makes it easier to cleanup allocated resources on exit.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
libFuzzer: Prevent a potential shift overflow
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The type of |base_offset| in get_delta_base() is `git_off_t`, which is a
signed `long`. That means that we need to make sure that the 8 most
significant bits are zero (instead of 7) to avoid an overflow when it is
shifted by 7 bits.
Found using libFuzzer.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
cmake: let USE_ICONV be optional on macOS
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Instead of forcing iconv support on macOS (by forcing `USE_ICONV`
on), honor the `USE_ICONV` option only on macOS.
Although macOS includes iconv by default, some macOS users may have a
deficient installation for some reason and they should be provided a
workaround to use libgit2 even in this situation.
iconv support is now disabled entirely on non-macOS platforms. No other
platform supports core.precomposeunicode, and iconv should never be
linked.
|
|\ \ \ \ \ \ \ \ \
| |_|_|_|_|_|/ / /
|/| | | | | | | | |
Do not attempt to check out submodule as blob when merging a submodule modify/deltete conflict
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | | |
modify/deltete conflict
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Add Jonathan Tan to git.git-authors
|