src/cli


Log

Author Commit Date CI Message
Edward Thomson 6c57bac6 2022-06-14T22:29:10 sha256: make sha256 an experimental optional feature libgit2 can be built with optional, experimental sha256 support. This allows consumers to begin testing and providing feedback for our sha256 support while we continue to develop it, and allows us to make API breaking changes while we iterate on a final sha256 implementation. The results will be `git2-experimental.dll` and installed as `git2-experimental.h` to avoid confusion with a production libgit2.
Edward Thomson d1036201 2022-06-18T16:10:38 meta: generated `features.h` is now `git2_features.h` Linux has a /usr/include/features.h, which gets confusing; update this to `git2_features.h` and move it into the `util` directory.
Edward Thomson 8444b6dc 2022-01-26T13:07:28 odb_hash*: accept the oid type to hash into The git_odb_hash helper functions should not assume SHA1, and instead should be given the oid type that they're producing.
Edward Thomson 3a737169 2022-06-11T16:14:11 progress: fewer updates about throughput Avoid too much flashing on the console with updates about throughput. Only update throughput once a second.
Edward Thomson 286e7f0a 2022-06-11T16:08:28 cli: show progress on 32 bit machines
Edward Thomson 8a757ae2 2020-04-04T18:31:00 cli: introduce a clone command
Edward Thomson 7babe76f 2020-05-12T08:56:55 cli: introduce signal handler Provide a mechanism to add a signal handler for Unix or Win32.
Edward Thomson 48506f2b 2020-04-04T18:29:34 cli: introduce a progress class Provide a class that will display progress information to the console. Initially, it contains callbacks for fetch progress and checkout progress.
Edward Thomson e32db9f2 2022-02-27T08:54:09 cli: always give a value to `error`
Edward Thomson e427d0a1 2021-11-30T10:33:24 cli: add `hash-object` command Introduce a simple command that emulates `git hash-object`.
Edward Thomson b8771227 2021-11-28T10:32:03 cli: add `cat-file` command Introduce a simple command that emulates `git cat-file`.
Edward Thomson f8e7d8fd 2021-11-26T17:33:38 cli: support `help <command>` 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.
Edward Thomson c6dd82d9 2020-02-23T11:54:33 cli: introduce a help command 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.
Edward Thomson 8526cbd5 2021-11-26T09:37:29 opt: use a custom function to print usage 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.
Edward Thomson 3a3ab065 2020-05-03T23:13:28 cli: infrastructure for a cli project 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.