<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/examples/describe.c, branch ethomson/test_https</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>examples: normalize decls and usage of options structs</title>
<updated>2019-11-06T10:17:56+00:00</updated>
<author>
<name>Etienne Samson</name>
<email>samson.etienne@gmail.com</email>
</author>
<published>2019-11-06T10:08:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=313908f9f5322f623ef1924f859726b39cb9740c'/>
<id>313908f9f5322f623ef1924f859726b39cb9740c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>global: DRY includes of assert.h</title>
<updated>2019-11-06T10:08:23+00:00</updated>
<author>
<name>Etienne Samson</name>
<email>samson.etienne@gmail.com</email>
</author>
<published>2019-11-06T10:08:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=cd5e33fbc2d11477aad954a6f343e791fdc7ef85'/>
<id>cd5e33fbc2d11477aad954a6f343e791fdc7ef85</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: cast away constness for reallocating head arrays</title>
<updated>2019-07-05T09:28:57+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-06-27T13:12:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=976eed8078c69857c698f8753a4a66bda4690882'/>
<id>976eed8078c69857c698f8753a4a66bda4690882</id>
<content type='text'>
When reallocating commit arrays in `opts_add_commit` and
`opts_add_refish`, respectively, we simply pass the const pointer to
`xrealloc`. As `xrealloc` expects a non-const pointer, though, this will
generate a warning with some compilers.

Cast away the constness to silence compilers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When reallocating commit arrays in `opts_add_commit` and
`opts_add_refish`, respectively, we simply pass the const pointer to
`xrealloc`. As `xrealloc` expects a non-const pointer, though, this will
generate a warning with some compilers.

Cast away the constness to silence compilers.
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: don't lose `const`</title>
<updated>2019-06-25T14:22:46+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-06-25T13:50:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=1118dd9a40ad2c443a047cbec4d9669bad9ee954'/>
<id>1118dd9a40ad2c443a047cbec4d9669bad9ee954</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename opt init functions to `options_init`</title>
<updated>2019-06-14T08:57:00+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-06-06T20:36:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=0b5ba0d744e69da5dc8c08d167c83dd87ed83af2'/>
<id>0b5ba0d744e69da5dc8c08d167c83dd87ed83af2</id>
<content type='text'>
In libgit2 nomenclature, when we need to verb a direct object, we name
a function `git_directobject_verb`.  Thus, if we need to init an options
structure named `git_foo_options`, then the name of the function that
does that should be `git_foo_options_init`.

The previous names of `git_foo_init_options` is close - it _sounds_ as
if it's initializing the options of a `foo`, but in fact
`git_foo_options` is its own noun that should be respected.

Deprecate the old names; they'll now call directly to the new ones.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In libgit2 nomenclature, when we need to verb a direct object, we name
a function `git_directobject_verb`.  Thus, if we need to init an options
structure named `git_foo_options`, then the name of the function that
does that should be `git_foo_options_init`.

The previous names of `git_foo_init_options` is close - it _sounds_ as
if it's initializing the options of a `foo`, but in fact
`git_foo_options` is its own noun that should be respected.

Deprecate the old names; they'll now call directly to the new ones.
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: create common lg2 executable</title>
<updated>2019-02-15T11:06:54+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-01-24T10:31:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=ead10785dcd9e7599a52a0349a69c113c76e650d'/>
<id>ead10785dcd9e7599a52a0349a69c113c76e650d</id>
<content type='text'>
Inside of our networking example code, we have a git2 executable
that acts as an entry point to all the different network
examples. As such, it is kind of the same like the normal git(1)
executable in that it simply arbitrates to the respective
subcommands.

Let's extend this approach and merge all examples into a single
standalone lg2 executable. Instead of building an executable
for all the existing examples we have, we now bundle them all
inside of the lg2 one and let them be callable via subcommands.

In the process, we can get rid of duplicated library
initialization, deinitialization and repository discovery code.
Instead of having each subcommand handle these on its own, we
simply do it inside of the single main function now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Inside of our networking example code, we have a git2 executable
that acts as an entry point to all the different network
examples. As such, it is kind of the same like the normal git(1)
executable in that it simply arbitrates to the respective
subcommands.

Let's extend this approach and merge all examples into a single
standalone lg2 executable. Instead of building an executable
for all the existing examples we have, we now bundle them all
inside of the lg2 one and let them be callable via subcommands.

In the process, we can get rid of duplicated library
initialization, deinitialization and repository discovery code.
Instead of having each subcommand handle these on its own, we
simply do it inside of the single main function now.
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: Move xrealloc to common example code</title>
<updated>2018-01-25T21:11:19+00:00</updated>
<author>
<name>Etienne Samson</name>
<email>samson.etienne@gmail.com</email>
</author>
<published>2018-01-17T01:25:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=3fa5e5779a636bad077af4aeb3006cc9defd2f66'/>
<id>3fa5e5779a636bad077af4aeb3006cc9defd2f66</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>print_usage functions is defined but not used</title>
<updated>2015-06-03T19:54:35+00:00</updated>
<author>
<name>Ariel O. Barria</name>
<email>ariel.barria@gmail.com</email>
</author>
<published>2015-06-03T19:54:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=9334c86f49ae1394d106fcc18784b132070c4cd2'/>
<id>9334c86f49ae1394d106fcc18784b132070c4cd2</id>
<content type='text'>
Use the previously created function to display a message when the arguments are not valid.

ticket 3095
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the previously created function to display a message when the arguments are not valid.

ticket 3095
</pre>
</div>
</content>
</entry>
<entry>
<title>describe example: function to add commits to opts</title>
<updated>2015-02-06T06:16:40+00:00</updated>
<author>
<name>Boris Egorov</name>
<email>egorov@linux.com</email>
</author>
<published>2015-02-06T05:43:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=23d1dbe91963b70fbf05ce504d8d143c5e5ec568'/>
<id>23d1dbe91963b70fbf05ce504d8d143c5e5ec568</id>
<content type='text'>
Add safe function to (a,rea)llocate memory which terminate example on
memory allocation failure.

Move code to allocate commits to its own function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add safe function to (a,rea)llocate memory which terminate example on
memory allocation failure.

Move code to allocate commits to its own function.
</pre>
</div>
</content>
</entry>
<entry>
<title>describe example: fix memory allocation size</title>
<updated>2015-01-25T16:34:46+00:00</updated>
<author>
<name>Boris Egorov</name>
<email>egorov@linux.com</email>
</author>
<published>2015-01-25T16:34:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=36e13399c030227d19523d19e3b75073a72cadb3'/>
<id>36e13399c030227d19523d19e3b75073a72cadb3</id>
<content type='text'>
We need to allocate memory for sizeof(char *) * ncommits, not just for
ncommits.

Issue detected by GCC's AddressSanitizer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to allocate memory for sizeof(char *) * ncommits, not just for
ncommits.

Issue detected by GCC's AddressSanitizer.
</pre>
</div>
</content>
</entry>
</feed>
