summaryrefslogtreecommitdiff
path: root/examples/for-each-ref.c
Commit message (Collapse)AuthorAgeFilesLines
* examples: create common lg2 executablePatrick Steinhardt2019-02-151-7/+3
| | | | | | | | | | | | | | | | | | 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.
* Merge pull request #4939 from libgit2/ethomson/git_refEdward Thomson2019-01-191-1/+1
|\ | | | | Move `git_ref_t` to `git_reference_t`
| * references: use new names in internal usageethomson/git_refEdward Thomson2019-01-171-1/+1
| | | | | | | | Update internal usage to use the `git_reference` names for constants.
* | object_type: convert final internal users to new namesethomson/git_objEdward Thomson2019-01-171-1/+1
|/ | | | | Update some missed types that were continuing to use the old `GIT_OBJ` names.
* for-each-ref example: init/shutdown libgit2 in mainBoris Egorov2015-02-051-0/+3
| | | | | | | I don't get how it was working without git_libgit2_init() call. I run it and libgit2 throws assertion somewhere in its internals. Now it works. Updated commit with shutdown at the end.
* examples: add a basic for-each-ref examplepeff/iconvJeff King2014-05-081-0/+46
This is quite close to running "git for-each-ref" except: 1. It does not take any formatting or selection options at all. 2. The output is not sorted. I wrote it to look at debugging some issues with ref iteration, but there's no reason it can't live on as an example command.