| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \ \
| | | | | |
| | | | | | |
common.h: use inline when compiling for C99 and later
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Support reading attributes from a specific commit
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Provide a mechanism to filter using attribute data from a specific
commit (making use of `GIT_ATTR_CHECK_INCLUDE_COMMIT`).
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Introduce `GIT_ATTR_CHECK_INCLUDE_COMMIT`, which like 4fd5748 allows
attribute information to be read from files in the repository. 4fd5748
always reads the information from HEAD, while
`GIT_ATTR_CHECK_INCLUDE_COMMIT` allows users to provide the commit to
read the attributes from.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When looking up an attribute file in a commit, we can cache a
nonexistent attribute file indefinitely (since a commit could not
somehow later contain an attribute file). Cache an empty buffer when an
attribute file does not exist in a given commit.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Allow filter users to provide an options structure instead of simply
flags. This allows for future growth for filter options.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Filters use a short-lived structure to keep state during an operation to
allow for caching and avoid unnecessary reallocations. This was
previously called the "filter options", despite the fact that they
contain no configurable options. Rename them to a "filter session" in
keeping with an "attribute session", which more accurately describes
their use (and allows us to create "filter options" in the future).
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Allow more advanced attribute queries using a `git_attr_options`, and
extended functions to use it. Presently there is no additional
configuration in a `git_attr_options` beyond the flags, but this is for
future growth.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The attribute source object is now the type and the path.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We may want to extend the attribute source; use a structure instead of
an enum.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The enum `git_attr_file_source` is better suffixed with a `_t` since
it's a type-of source. Similarly, its members should have a matching
name.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
len, array -> array, len
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This change introduces a new API function
`git_graph_reachable_from_any()`, that answers the question whether a
commit is reachable from any of the provided commits through following
parent edges.
This function can take advantage of optimizations provided by the
existence of a `commit-graph` file, since it makes it faster to know
whether, given two commits X and Y, X cannot possibly be an reachable
from Y.
Part of: #5757
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This change makes calculations of merge-bases a bit faster when there
are complex graphs and the commit times cause visiting nodes multiple
times. This is done by visiting the nodes in the graph in reverse
generation order when the generation number is available instead of
commit timestamp. If the generation number is missing in any pair of
commits, it can safely fall back to the old heuristic with no negative
side-effects.
Part of: #5757
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | | |
commit-graph: Use the commit-graph in revwalks
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This change does a medium-size refactor of the git_commit_graph_file and
the interaction with the ODB. Now instead of the ODB owning a direct
reference to the git_commit_graph_file, there will be an intermediate
git_commit_graph. The main advantage of that is that now end users can
explicitly set a git_commit_graph that is eagerly checked for errors,
while still being able to lazily use the commit-graph in a regular ODB,
if the file is present.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This change makes revwalks a bit faster by using the `commit-graph` file
(if present). This is thanks to the `commit-graph` allow much faster
parsing of the commit information by requiring near-zero I/O (aside from
reading a few dozen bytes off of a `mmap(2)`-ed file) for each commit,
instead of having to read the ODB, inflate the commit, and parse it.
This is done by modifying `git_commit_list_parse()` and letting it use
the ODB-owned commit-graph file.
Part of: #5757
|
|\ \ \ \ \ \ \
| |_|_|_|_|_|/
|/| | | | | | |
[Submodule] Git submodule dup
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
been added.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |_|_|/ / / /
|/| | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This refactors this to a wrapper function, as well as changing the
existing API have a va_list and ... version.
|
| | | | | | |
| | | | | | |
| | | | | | | |
Co-authored-by: lhchavez <lhchavez@lhchavez.com>
|
| | | | | | | |
|
| | | | | | | |
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add `GIT_DEBUG_STRICT_ALLOC` to help identify problematic callers of
allocation code that pass a `0` size to the allocators and then expect a
non-`NULL` return.
When given a 0-size allocation, `malloc` _may_ return either a `NULL`
_or_ a pointer that is not writeable. Most systems return a non-`NULL`
pointer; AIX is an outlier. We should be able to cope with this AIXy
behavior, so this adds an option to emulate it.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
stdintification: use int64_t and INT64_C instead of long long
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
For 32-bit int: There's no real reason for that ifdef if we explicitly
specify the stdint.h type.
For 64-bit int: ope, I made it signed accidentally
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Even on systems without C99 where long long and stdint are both
missing, we can shim stdint and point it to any compiler-specific
type (i.e long long, _int64, etc.).
Also next is constant suffixes and determining what needs to
include stdint.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Makes usage of CLOCK_MONOTONIC conditional and makes functions that uses
git__timer handle clock resynchronization.
Call gettimeofday with tzp set to NULL as required by
https://pubs.opengroup.org/onlinepubs/9699919799/functions/gettimeofday.html
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
fix check for ignoring of negate rules
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Co-authored-by: lhchavez <lhchavez@lhchavez.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Co-authored-by: lhchavez <lhchavez@lhchavez.com>
|
| | |_|/ / / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
gitignore rule like "*.pdf" should be negated by "!dir/test.pdf" even though one is inside a directory since *.pdf isn't restricted to any directory
this is fixed by making wildcard match treat * like ** by excluding WM_PATHNAME flag when the rule isn't for a full path
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fix wrong time_t used in function
|
| | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This function doesn't interoperate with any system functions that
use the system time_t, but rather only works with the git_time_t
type in libgit2, which could be a different width than the system
one. Fixes a compile warning.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
config: fix included configs not refreshed more than once
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
If an included config is refreshed twice, the second update is not taken
into account.
This is because the list of included files is cleared after re-reading
the new configuration, instead of being cleared before.
Fix it and add a test case to check for this bug.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix memory leak in git_smart__connect
|
| | | | | | | | | |
|
| | |_|_|_|_|/ /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The call to git_proxy_options_dup will replace the url pointer of the
proxy.
But if the url pointer is already set, the old address will be lost
forever and will never be free.
|