<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git, branch ethomson/cli_redux</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>cmake: use project-specific root variable instead of CMAKE_SOURCE_DIR</title>
<updated>2021-12-23T18:59:40+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-12-23T18:59:40+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=fbe0b90fc0f79bfd1cdecac2807c6cf81b05efad'/>
<id>fbe0b90fc0f79bfd1cdecac2807c6cf81b05efad</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: add `hash-object` command</title>
<updated>2021-12-10T13:44:10+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-11-30T15:33:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=2b140a3cab34839ff5443bdab6ac3a0295e4feb8'/>
<id>2b140a3cab34839ff5443bdab6ac3a0295e4feb8</id>
<content type='text'>
Introduce a simple command that emulates `git hash-object`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a simple command that emulates `git hash-object`.
</pre>
</div>
</content>
</entry>
<entry>
<title>futils: provide an option to read a whole file by fd</title>
<updated>2021-12-10T13:44:10+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-11-29T17:04:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=3a008b75010f5be421025d03589d136666677c62'/>
<id>3a008b75010f5be421025d03589d136666677c62</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: add `cat-file` command</title>
<updated>2021-12-10T13:44:10+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-11-28T15:32:03+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=4aa65b7376ff561cd0fa8db276b6ac0cd3040709'/>
<id>4aa65b7376ff561cd0fa8db276b6ac0cd3040709</id>
<content type='text'>
Introduce a simple command that emulates `git cat-file`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a simple command that emulates `git cat-file`.
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: support `help &lt;command&gt;`</title>
<updated>2021-12-10T13:44:10+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-11-26T22:33:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=49c09d44e51b479be77cc90bc4d4275207049fef'/>
<id>49c09d44e51b479be77cc90bc4d4275207049fef</id>
<content type='text'>
Support `help &lt;command&gt;` by re-invoking the command itself with the
`--help` argument.  This allows us to keep the help logic with the
commands itself.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support `help &lt;command&gt;` by re-invoking the command itself with the
`--help` argument.  This allows us to keep the help logic with the
commands itself.
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: introduce a help command</title>
<updated>2021-12-10T13:44:10+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-02-23T11:54:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=498d19f29ba2edd7e2bce47c07b086fbb518fc7f'/>
<id>498d19f29ba2edd7e2bce47c07b086fbb518fc7f</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>opt: use a custom function to print usage</title>
<updated>2021-12-10T13:44:10+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-11-26T14:37:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=c2b88e3a5f9f98bf6a4ac6affb62295d12e7a8fe'/>
<id>c2b88e3a5f9f98bf6a4ac6affb62295d12e7a8fe</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: infrastructure for a cli project</title>
<updated>2021-12-10T13:44:10+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-05-03T22:13:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=fe0e4fbe7b817892e630b342de6b8a6590b64482'/>
<id>fe0e4fbe7b817892e630b342de6b8a6590b64482</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>cmake: refactor `add_clar_test` into separate module</title>
<updated>2021-12-06T00:47:37+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-11-17T19:31:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=cf7c3ed845d2183aa9cc772af42eee386f5ab5de'/>
<id>cf7c3ed845d2183aa9cc772af42eee386f5ab5de</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: move utility tests into util</title>
<updated>2021-12-06T00:47:36+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-11-17T04:59:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=dbd5d9bb3da8ac8b300be1314a1d82545f552a02'/>
<id>dbd5d9bb3da8ac8b300be1314a1d82545f552a02</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
