| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| | |
CLI (redux)
|
| | |
| |
| |
| | |
Introduce a simple command that emulates `git hash-object`.
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Introduce a simple command that emulates `git cat-file`.
|
| | |
| |
| |
| |
| |
| | |
Support `help <command>` by re-invoking the command itself with the
`--help` argument. This allows us to keep the help logic with the
commands itself.
|
| | |
| |
| |
| |
| |
| |
| | |
Add a framework for commands to be defined, and add our first one,
"help". When `git2_cli help` is run, the `cmd_help` function will be
invoked with the remaining command line arguments. This allows users to
invoke `git2_cli help foo` to get information about the `foo` subcommand.
|
| | |
| |
| |
| |
| |
| |
| | |
Our argument parser (https://github.com/ethomson/adopt) includes a
function to print a usage message based on the allowed options. Omit
this and use a cutom function that understands that we have subcommands
("checkout", "revert", etc) that each have their own options.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduce a command-line interface for libgit2. The goal is for it to
be git-compatible.
1. The libgit2 developers can more easily dogfood libgit2 to find bugs,
and performance issues.
2. There is growing usage of libgit2's examples as a client; libgit2's
examples should be exactly that - simple code samples that illustrate
libgit2's usage. This satisfies that need directly.
3. By producing a client ourselves, we can better understand the needs
of client creators, possibly producing a shared "middleware" for
commonly-used pieces of client functionality like interacting with
external tools.
4. Since git is the reference implementation, we may be able to benefit
from git's unit tests, running their test suite against our CLI to
ensure correct behavior.
This commit introduces a simple infrastructure for the CLI.
The CLI is currently links libgit2 statically; this is because the
utility layer is required for libgit2 _but_ shares the error state
handling with libgit2 itself. There's no obviously good solution
here without introducing annoying indirection or more complexity.
Until we can untangle that dependency, this is a good step forward.
In the meantime, we link the libgit2 object files, but we do not include
the (private) libgit2 headers. This constrains the CLI to the public
libgit2 interfaces.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
The `git2internal` target is actually the git library; call it such so
that IDE users have visibility into it.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of simply including the utility files directly, make them a
cmake object library for easy reusability between other projects within
libgit2.
Now the top-level `src` is responsible for platform selection, while the
next-level `libgit2` and `util` configurations are responsible for
identifying what objects they include.
|
| | | |
|
| | |
| |
| |
| |
| | |
The `git_error_set` function is useful for callers who implement
backends and advanced callbacks. Expose it.
|
| |/
|
|
|
| |
Newer gcc is complaining about `object` being potentially not
initialized; initialize it.
|
| |\
| |
| | |
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.
|
| |\ \
| |/
|/| |
remote: do store the update_tips callback error value
|
| | | |
|
| |/
|
|
|
|
|
|
| |
We use `git_error_set_after_callback_function` to determine whether
`update_tips` returned an error but do not store its return value making us
think it always returns 0.
Fix it by adding the common patter of storing it inside the `if` when calling it.
|
| |\
| |
| | |
meta: update version number to v1.5.0-alpha
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update the version number in main to v1.5.0-alpha. This helps people
understand that the main builds are not part of the v1.4.0 release
train.
We use "alpha" to indicate builds out of main (or nightlies) as semver
v2 requires the prerelease component is compared lexicographically.
Thus, our "beta" and "rc" releases should follow.
|
| |\ \
| | |
| | | |
xdiff: use xdl_free not free
|
| | |/
| |
| |
| |
| |
| |
| |
| | |
We've added a lovely abstraction layer in xdiff so that it can call our
allocation functions. But it also needs to call our free functions. We
missed some `free` calls in `xmerge.c`. Update them to use `xdl_free`.
Without this, we will pass a pointer allocated with a custom allocator
to the system free function. :bomb:
|
| |\ \
| | |
| | | |
Free parent and ref in lg2_commit before returning.
|
| | |/ |
|
| |\ \
| |/
|/| |
cmake: Fix package name for system http-parser
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix building against system http-parser library by fixing
the find_package() argument. It seems to have been accidentally changed
from HTTPParser to HTTP_Parser in de178d36f, effectively making
the build against system library fail to find it:
```
CMake Warning at cmake/SelectHTTPParser.cmake:3 (find_package):
By not providing "FindHTTP_Parser.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"HTTP_Parser", but CMake did not find one.
Could not find a package configuration file provided by "HTTP_Parser" with
any of the following names:
HTTP_ParserConfig.cmake
http_parser-config.cmake
Add the installation prefix of "HTTP_Parser" to CMAKE_PREFIX_PATH or set
"HTTP_Parser_DIR" to a directory containing one of the above files. If
"HTTP_Parser" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
src/CMakeLists.txt:97 (include)
CMake Error at cmake/SelectHTTPParser.cmake:11 (message):
http-parser support was requested but not found
Call Stack (most recent call first):
src/CMakeLists.txt:97 (include)
```
|
| |\
| |
| | |
meta: show build status for v1.3 and v1.4 branches
|
| | | |
|
| |\ \
| |/
|/| |
libgit2 v1.4
|
| | | |
|
| |/ |
|
| |\
| |
| | |
Fix crashes in example programs on Windows (sprintf_s not compatible with snprintf)
|