Commit Graph

6 Commits

Author SHA1 Message Date
Peter Salomonsen
dc2beb7e2d examples: additions and fixes
add example for git commit
fix example for git add
add example for git push
2020-04-02 18:39:37 +02:00
Etienne Samson
c924f36a8b examples: keep track of whether we processed a "--" arg 2019-11-06 11:12:34 +01:00
Patrick Steinhardt
88731e3c33 examples: implement git-stash example
Implement a new example that resembles the git-stash(1) command.
Right now, it only provides the apply, list, save and pop
subcommands without any options.

This example is mostly used to test libgit2's stashing
performance on big repositories.
2019-07-20 19:10:57 +02:00
Patrick Steinhardt
8ee3d39afd examples: implement config example
Implement a new example that resembles git-config(1). Right now,
this example can both read and set configuration keys, only.
2019-07-11 08:28:55 +02:00
Patrick Steinhardt
106998fce6 examples: print available commands if no args are given 2019-02-15 12:07:07 +01: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