| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
`git_reference_cmp` only considers the target of a reference, and
ignores the name. Meaning that a reference `foo` and reference `bar`
pointing to the same commit will compare equal.
Correct this, comparing the name _and_ target of a reference.
|
| |\
| |
| | |
fix interactive rebase detect.
|
| | | |
|
| | | |
|
| |/ |
|
| |\
| |
| | |
filter: Fix Segfault
|
| | | |
|
| | | |
|
| | |
| |
| | |
Co-authored-by: Edward Thomson <ethomson@github.com>
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Update our ownership checks that were introduced in libgit2 v1.4.3
(to combat CVE 2022-24765). These were not compatible with git's; git
itself allows administrators to own the path. Our checks now match
this behavior.
|
| |\ \
| | |
| | |
| | |
| | | |
lhchavez/git_transport_smart_remote_connect_options
transport: introduce `git_transport_smart_remote_connect_options`
|
| | |\ \ |
|
| | | | |
| | | |
| | | | |
Co-authored-by: Edward Thomson <ethomson@github.com>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
6fc6eeb66c40310086c8f059cae41de69ad4c6da removed
`git_transport_smart_proxy_option`, and there was nothing added to
replace it. That made it hard for custom transports / smart
subtransports to know what remote connect options to use (e.g. proxy
options).
This change introduces `git_transport_smart_remote_connect_options` to
replace it.
|
| |\ \ \ \
| |_|/ /
|/| | | |
A couple of simplications around mwindow
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is a very verbose way of performing a comparison where we already
have the identity value with both signs. Instead of chainging several
conditions, we can rely on the maths working out.
|
| | | |/
| |/|
| | |
| | |
| | | |
This makes it a bit easier to read while letting the caller specify
how big the hash size is for this particular call.
|
| |\ \ \
| | | |
| | | | |
refs: fix missing error message
|
| | |/ / |
|
| |\ \ \
| | | |
| | | | |
midx: do not verify the checksum on load
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is something we only want to do during explicit verification rather than on
every load.
Verifying does not seem like a big deal when we're running with test workloads
but once your `multi-pack-index` reaches gigabytes, we spend more time hashing
this than doing any work.
|
| | | |
| | |
| | |
| | |
| | | |
Though both are correct, this makes it clear that we're dealing with
the same value.
|
| |/ /
| |
| |
| |
| |
| |
| |
| | |
It's insufficient to only check if the offset high order bit is set, we
must also check to see if object_large_offsets are in use.
This bug is causing objects to appear missing because they can't be
found in the index.
|
| |\ \
| |/
|/| |
sha256: refactoring in preparation for sha256
|
| | |
| |
| |
| |
| | |
A multi-pack index uses raw oid data, use a byte array to index
into them.
|
| | |
| |
| |
| |
| | |
The index contains entries with raw oid data, use a byte array for the
raw entry data.
|
| | |
| |
| |
| |
| | |
A packfile contains arrays of raw oid data, use a byte array to index
into them.
|
| | |
| |
| |
| |
| | |
The commit graph contains arrays of raw oid data, use a byte array to
index into them.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Now that oids are type-aware, they use their type to understand how many
bytes to copy. Some callers may need to copy the raw bytes of the
object id.
This is equivalent to a memcpy that is a little more semantic.
|
| | | |
|
| | |
| |
| |
| |
| | |
We will talk about "raw" oids as untyped blobs of data; use a name for
the comparison function that is in keeping with that.
|
| | |
| |
| |
| | |
Don't write the object id structure, write its raw oid data.
|
| | |
| |
| |
| |
| | |
We explicitly want to write on the id data, not the beginning of the
object data, which may contain other information in the future.
|
| | |
| |
| |
| |
| | |
We explicitly want to hash on the id data, not the beginning of the
object data, which may contain other information in the future.
|
| | |
| |
| |
| |
| | |
Don't assume that a `git_oid` is a particular size; allocate
`sizeof(git_oid)` instead.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A tree entry previously pointed directly into the object id within the
tree object itself; this is useful to avoid any unnecessary memory copy
(and an unnecessary use of 40 bytes per tree entry) but difficult if we
change the underlying `git_oid` object to not simply be a raw object id
but have additional structure.
This commit moves the `git_oid` directly into the tree entry; this
simplifies the tree entry creation from user data. We now copy the
`git_oid` into place when parsing.
|
| | |
| |
| |
| |
| | |
Introduce the `GIT_OPT_SET_OWNER_VALIDATION` option, so that users can
disable repository ownership validation.
|
| | |
| |
| |
| |
| |
| |
| | |
Obey the `safe.directory` configuration variable if it is set in the
global or system configuration. (Do not try to load this from the
repository configuration - to avoid malicious repositories that then
mark themselves as safe.)
|
| | |
| |
| |
| |
| | |
Pull the global configuration loader out of the symlink check so that it
can be re-used.
|
| | |
| |
| |
| |
| |
| | |
Ensure that the repository directory is owned by the current user; this
prevents us from opening configuration files that may have been created
by an attacker.
|
| |/
|
|
|
|
| |
Provide individual file ownership checks for both the current user and
the system user, as well as a combined current user and system user
check.
|
| |\
| |
| | |
midx: Fix an undefined behavior (left-shift signed overflow)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There was a missing check to ensure that the `off64_t` (which is a
signed value) didn't overflow when parsing it from the midx file. This
shouldn't have huge repercusions since the parsed value is immediately
validated afterwards, but then again, there is no such thing as "benign"
undefined behavior.
This change makes all the bitwise arithmetic happen with unsigned types
and is only casted to `off64_t` until the very end.
Thanks to Taotao Gu for finding and reporting this!
|
| |\ \
| |/
|/| |
Fix crash when regenerating a patch with unquoted spaces in filename
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
This fixes a crash in test cases
test_diff_parse__new_file_with_space_and_regenerate_patch
and
test_diff_parse__delete_file_with_space_and_regenerate_patch
|
| | |
| |
| |
| |
| | |
Support the ability to create a refspec that is a single object ID
without a destination.
|
| |/
|
|
|
|
| |
As builtin extensions are evaluated in the latter half of `check_valid_extension`, a string `cfg` is concatenated with the static string 'extension.' and the value from `builtin_extension`, before being compared with the configured value. This string is not being cleared while iterating through the names of the extensions. Because there is currently only one extension ('noop'), the bug was never noticible.
This patch corrects the behavior by clearing the string on each iteration, as is done in the first block.
|
| | |
|