| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
| |
Like we want to separate libgit2 and utility source code, we want to
separate libgit2 and utility tests. Start by moving all the tests into
libgit2.
|
| | |
|
| |\
| |
| | |
win32: `find_system_dirs` does not return `GIT_ENOTFOUND`
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Allow for no Git for Windows installation. When there is no GfW found
in the path or registry, `git_win32__find_system_dirs` would return a
`GIT_ENOTFOUND`. Callers were not expecting this. Since this is no
error, we simply return `0` so that callers can move on with their
lives.
|
| |/ |
|
| |
|
|
|
| |
This test was also provided by @jorio
https://github.com/libgit2/libgit2/pull/6208#issuecomment-1034072050
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
"diff_file_content_load_workdir_file()" maps a file from the workdir
into memory. It uses git_diff_file.size to determine the size of the
memory mapping.
If this value goes stale, the mmaped area would be sized incorrectly.
This could occur if an external program changes the contents of the
file after libgit2 had cached its size. This used to segfault if the
file becomes smaller (mmaped area too large).
This patch causes diff_file_content_load_workdir_file to fail without
crashing if it detects that the file size has changed.
|
| |\
| |
| | |
Fetch by object id
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
Introduce a function that determines whether a given string is a valid
object id (40 chars of hexadigits).
|
| |\ \
| |/
|/| |
SHA256: early preparation
|
| | |
| |
| |
| |
| | |
Deprecate the `git_packfile_hash` function. Callers should use the new
`git_packfile_name` function which provides a unique packfile name.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The index's checksum is not an object ID, so we should not use the
`git_oid` type. Use a byte array for checksum calculation and storage.
Deprecate the `git_indexer_hash` function. Callers should use the new
`git_indexer_name` function which provides a unique packfile name.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The index's checksum is not an object ID, so we should not use the
`git_oid` type. Use a byte array for checksum calculation and storage.
Deprecate the `git_index_checksum` function without a replacement. This
is an abstraction that callers should not care about (and indeed do not
seem to be using).
Remove the unused `git_index__changed_relative_to` function.
|
| | |
| |
| |
| |
| |
| | |
Underscores in filenames in tests indicate a logical separation - so
`commit_graph` becomes `commit::graph`. Rename it to `commitgraph` to
avoid this.
|
| |\ \
| | |
| | | |
revparse: support bare '@'
|
| | | |
| | |
| | |
| | | |
A bare '@' revision syntax represents HEAD. Support it as such.
|
| |\ \ \
| | | |
| | | | |
merge: comment conflicts lines in MERGE_MSG
|
| | |/ /
| | |
| | |
| | |
| | | |
git has started adding comment markers to its conflict lines in
MERGE_MSG. Match that behavior.
|
| |\ \ \
| |/ /
|/| | |
merge: support zdiff3 conflict styles
|
| | |/ |
|
| |\ \ |
|
| | | | |
|
| |\ \ \
| |_|/
|/| | |
refs: Speed up packed lookups.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently ref lookups require loading the entire packed-refs file into
a hashmap in memory. For repos with large numbers of refs this can be
painfully slow.
This patch replaces the existing lookup code and instead mmap()'s the
packed-refs file and performs a binary search to locate the ref entry.
Git uses a similiar approach.
The old hash table codepath is still used for unsorted packed-refs files.
This patch also fixes a minor bug where the "peeled" trait is never
parsed correctly from the packed-refs header.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We look for a Git for Windows installation to use its git config,
so that clients built on libgit2 can interoperate with the Git for
Windows CLI (and clients that are built on top of _it_).
Look for `git` both in the `PATH` and in the registry. Use the _first_
git install in the path, and the first git install in the registry.
Look in both the `etc` dir and the architecture-specific `etc` dirs
(`mingw64/etc` and `mingw32/etc`) beneath the installation root.
Prefer the git in the `PATH` to the git location in the registry so that
users can override that.
Include more tests for this behavior.
|
| | | |
| | |
| | |
| | |
| | | |
Provide a helper function to find an executable in the current process's
PATH.
|
| | | | |
|
| |\ \ \
| | | |
| | | | |
Support scp style paths with ports
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We occasionally need to determine whether a given string is a URL or
something else. (The "something else" may be a git path in a different
format, like scp formatting, which needs to be handled differently.)
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Provide a mechanism for parsing scp-style paths (eg
`git@github.com:libgit2/libgit2` into the url form
`ssh://git@github.com/libgit2/libgit2`.)
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
GitHub is removing support for the unauthenticated git protocol; test
with the https protocol.
|
| |\ \ \ \
| |/ / / |
|
| | | | |
| | | |
| | | |
| | | | |
Test that we honor `http.followRedirects` when set to initial or false.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Give callers the ability to select how to handle redirects - either
supporting redirects during the initial connection (so that, for
example, `git.example.com/repo` can redirect to `github.com/example/repo`)
or all/no redirects. This is for compatibility with git.
|
| | | |/
| |/|
| | |
| | | |
In redirect application logic, (optionally) allow off-site redirects.
|
| | | | |
|
| | |\ \ |
|
| | | | | |
|
| | | | | |
|
| | |\ \ \
| | | | |
| | | | | |
config: handle empty conditional in includeIf
|
| | | |/ /
| | | |
| | | |
| | | |
| | | |
| | | | |
When a config file contains `[includeIf]` (with no condition), we should
treat that as a falsey value. This means that we should properly parse
a config value of `includeIf.path`.
|
| | |/ / |
|
| |/ / |
|
| | | |
|
| | | |
|