<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/cli/cli.h, branch ethomson/objectformat</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>cli: introduce signal handler</title>
<updated>2022-04-14T13:59:07+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-05-12T07:56:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=7babe76f97822c701050c6ee8d3984462f73c27f'/>
<id>7babe76f97822c701050c6ee8d3984462f73c27f</id>
<content type='text'>
Provide a mechanism to add a signal handler for Unix or Win32.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a mechanism to add a signal handler for Unix or Win32.
</pre>
</div>
</content>
</entry>
<entry>
<title>opt: use a custom function to print usage</title>
<updated>2022-02-26T19:43:48+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://git.baserock.org/cgit/delta/libgit2.git/commit/?id=8526cbd56b0395b9427727e81e6f3c89768337b9'/>
<id>8526cbd56b0395b9427727e81e6f3c89768337b9</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>2022-02-26T19:43:48+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://git.baserock.org/cgit/delta/libgit2.git/commit/?id=3a3ab065f0685202c854e13708ddfd2a93d75e2c'/>
<id>3a3ab065f0685202c854e13708ddfd2a93d75e2c</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>
</feed>
