summaryrefslogtreecommitdiff
path: root/examples/general.c
Commit message (Collapse)AuthorAgeFilesLines
* strarray: we should `dispose` instead of `free`Edward Thomson2020-06-011-1/+1
| | | | | | 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.
* examples: consolidate includes into "common.h"Patrick Steinhardt2019-07-051-3/+3
| | | | | Consolidate all standard includes and defines into "common.h". This lets us avoid having to handle platform-specific things in multiple places.
* examples: avoid warning when iterating over index entriesPatrick Steinhardt2019-07-051-1/+1
| | | | | | | | When iterating over index entries, we store the indices in an unsigned int. As the index entrycount is a `size_t` though, this may be a loss of precision which a compiler might rightfully complain about. Use `size_t` instead to fix any warnings.
* examples: create common lg2 executablePatrick Steinhardt2019-02-151-2/+1
| | | | | | | | | | | | | | | | | | 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.
* examples: don't use deprecated typesEdward Thomson2019-01-251-2/+2
|
* errors: remove giterr usage in examplesEdward Thomson2019-01-221-1/+1
|
* Merge pull request #4939 from libgit2/ethomson/git_refEdward Thomson2019-01-191-2/+2
|\ | | | | Move `git_ref_t` to `git_reference_t`
| * references: use new names in internal usageethomson/git_refEdward Thomson2019-01-171-2/+2
| | | | | | | | 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-2/+2
|/ | | | | Update some missed types that were continuing to use the old `GIT_OBJ` names.
* treewide: remove use of C++ style commentsPatrick Steinhardt2018-07-131-5/+7
| | | | | | | | | C++ style comment ("//") are not specified by the ISO C90 standard and thus do not conform to it. While libgit2 aims to conform to C90, we did not enforce it until now, which is why quite a lot of these non-conforming comments have snuck into our codebase. Do a tree-wide conversion of all C++ style comments to the supported C style comments to allow us enforcing strict C90 compliance in a later commit.
* Fix Issue #4047 Check return codes and free objectsexample_generalDouglas Swanson2017-10-071-3/+28
|
* examples: general: fix memory leaksPatrick Steinhardt2017-01-121-1/+30
|
* examples: general: display config only if it was foundPatrick Steinhardt2017-01-121-3/+3
|
* examples: general: narrow down scope of loop variablesPatrick Steinhardt2017-01-121-4/+6
|
* examples: general: clean up committer/author variablesPatrick Steinhardt2017-01-121-4/+4
|
* Fix issue #4046 Seg fault in config_files()Douglas Swanson2016-12-291-4/+6
|
* examples: general: fix remaining warningsPatrick Steinhardt2016-10-101-9/+14
|
* examples: general: convert C99 comments to C90 commentsPatrick Steinhardt2016-10-101-42/+54
|
* examples: general: extract function demonstrating OID parsingPatrick Steinhardt2016-10-101-26/+44
|
* examples: general: extract function demonstrating ODBPatrick Steinhardt2016-10-101-51/+77
|
* examples: general: extract function demonstrating commit writingPatrick Steinhardt2016-10-101-36/+51
|
* examples: general: extract functions demonstrating object parsingPatrick Steinhardt2016-10-101-131/+194
|
* examples: general: extract function demonstrating revwalkingPatrick Steinhardt2016-10-101-39/+53
|
* examples: general: extract function demonstrating index walkingPatrick Steinhardt2016-10-101-24/+33
|
* examples: general: extract function demonstrating reference listingsPatrick Steinhardt2016-10-101-22/+36
|
* examples: general: extract function demonstrating config filesPatrick Steinhardt2016-10-101-14/+23
|
* examples: general: use tabs instead of spacesPatrick Steinhardt2016-10-101-457/+457
|
* Update link to Pro Git's Git internals chapter.Patrick McKenna2016-03-071-3/+2
|
* Spelling fixesWill Stamper2014-12-041-2/+2
|
* Rename git_threads_ to git_libgit2_Carlos Martín Nieto2014-11-081-0/+4
| | | | | | This describes their purpose better, as we now initialize ssl and some other global stuff in there. Calling the init function is not something which has been optional for a while now.
* Factor 40 and 41 constants from source.Ciro Santilli2014-09-161-2/+2
|
* MSVC doesn't like modern code neitherLinquize2014-01-271-2/+1
|
* Update files that reference tests-clarBen Straub2013-11-141-1/+1
|
* Replace copyright topmatter in example filesBen Straub2013-11-021-0/+14
|
* refs: remove the OID/SYMBOLIC filteringCarlos Martín Nieto2013-05-111-1/+1
| | | | | | | | | Nobody should ever be using anything other than ALL at this level, so remove the option altogether. As part of this, git_reference_foreach_glob is now implemented in the frontend using an iterator. Backends will later regain the ability of doing the glob filtering in the backend.
* examples: Don't print weird charactersVicent Marti2013-04-101-2/+1
|
* General example: run against testrepo.gitBen Straub2013-04-041-9/+13
| | | | Fixes #1455
* Add rudimentary error checks and reformat commentsRussell Belfer2013-02-151-146/+207
| | | | | | | | | There were a number of functions assigning their return value to `error` without much explanation. I added in some rudimentary error checking to help flesh out the example. Also, I reformatted all of the comments down to 80 cols (and in some cases, slightly updated the wording).
* removed other references to api.htmlCarlos Scheidegger2013-02-061-2/+1
|
* API updates for index.hBen Straub2012-11-271-1/+1
|
* Update diff callback param orderRussell Belfer2012-11-271-1/+1
| | | | | | | | This makes the diff functions that take callbacks both take the payload parameter after the callback function pointers and pass the payload as the last argument to the callback function instead of the first. This should make them consistent with other callbacks across the API.
* API review / update for tree.hRussell Belfer2012-11-271-2/+2
|
* Examples: fix reference namesBen Straub2012-11-271-2/+2
|
* tag: rename git_tag_type to git_tag_target_typenulltoken2012-11-171-1/+1
|
* index refactoringEdward Thomson2012-10-291-1/+1
|
* examples: fix config getter param orderCarlos Martín Nieto2012-09-301-2/+2
|
* Fix examples/general.c compilationScott J. Goldman2012-05-201-1/+1
| | | | git_reference_listall() -> git reference_list()
* errors: Rename the generic return codesVicent Martí2012-05-181-1/+1
|
* Basic setup for profilingRussell Belfer2012-05-171-1/+1
| | | | | This fixes the examples so they will build and adds a PROFILE option to the CMakeFile that enabled gprof info on non-Windows
* examples: use git_repository_odb instead of _databaseCarlos Martín Nieto2012-01-131-1/+1
|