summaryrefslogtreecommitdiff
path: root/examples/lg2.c
Commit message (Collapse)AuthorAgeFilesLines
* examples: additions and fixesPeter Salomonsen2020-04-021-0/+2
| | | | | | add example for git commit fix example for git add add example for git push
* examples: keep track of whether we processed a "--" argEtienne Samson2019-11-061-2/+1
|
* examples: implement git-stash examplePatrick Steinhardt2019-07-201-0/+1
| | | | | | | | | 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.
* examples: implement config examplePatrick Steinhardt2019-07-111-0/+1
| | | | | Implement a new example that resembles git-config(1). Right now, this example can both read and set configuration keys, only.
* examples: print available commands if no args are givenPatrick Steinhardt2019-02-151-4/+16
|
* examples: create common lg2 executablePatrick Steinhardt2019-02-151-0/+109
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.