Commit Graph

11 Commits

Author SHA1 Message Date
Edward Thomson
f004096fff examples: use unsigned int for bitfields 2023-12-20 12:08:21 +00:00
Aaron Franke
7efddeb737 Fix some typos 2021-02-15 16:01:25 -05:00
Edward Thomson
51eff5a58b strarray: we should dispose instead of free
We _dispose_ the contents of objects; we _free_ objects (and their
contents).  Update `git_strarray_free` to be `git_strarray_dispose`.
`git_strarray_free` remains as a deprecated proxy function.
2020-06-01 22:50:28 +01:00
Patrick Steinhardt
d2d01f7152 Merge pull request #5283 from pks-t/pks/example-checkout-remote-branch
examples: checkout: implement guess heuristic for remote branches
2019-12-13 11:49:37 +01:00
Etienne Samson
c924f36a8b examples: keep track of whether we processed a "--" arg 2019-11-06 11:12:34 +01:00
Etienne Samson
cd5e33fbc2 global: DRY includes of assert.h 2019-11-06 11:08:23 +01:00
Patrick Steinhardt
a9b5270b9a examples: checkout: implement guess heuristic for remote branches 2019-10-25 08:11:28 +02:00
David Turner
ed387d4af6 Fix example checkout to forbid rather than require --
Make the example program for checkout follow git syntax, where
"--" indicates a file.  This was likely just a strcmp return
value confusion.
2019-07-24 12:01:27 -04:00
Patrick Steinhardt
ead10785dc examples: create common lg2 executable
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.
2019-02-15 12:06:54 +01:00
Edward Thomson
fcc7dcb176 errors: remove giterr usage in examples 2019-01-22 22:30:37 +00:00
Etienne Samson
b24202e154 examples: add checkout 2018-07-17 21:43:28 +02:00