summaryrefslogtreecommitdiff
path: root/examples/common.h
Commit message (Collapse)AuthorAgeFilesLines
* Update common.hapnadkarni2022-02-131-1/+1
|
* Fix some typosAaron Franke2021-02-151-1/+1
|
* examples: additions and fixesPeter Salomonsen2020-04-021-0/+2
| | | | | | add example for git commit fix example for git add add example for git push
* credential: change git_cred to git_credentialethomson/credtypeEdward Thomson2020-01-261-1/+1
| | | | | | | | | | | | | | | | We avoid abbreviations where possible; rename git_cred to git_credential. In addition, we have standardized on a trailing `_t` for enum types, instead of using "type" in the name. So `git_credtype_t` has become `git_credential_t` and its members have become `GIT_CREDENTIAL` instead of `GIT_CREDTYPE`. Finally, the source and header files have been renamed to `credential` instead of `cred`. Keep previous name and values as deprecated, and include the new header files from the previous ones.
* examples: move "args" to its own headerEtienne Samson2019-11-061-71/+2
|
* global: DRY includes of assert.hEtienne Samson2019-11-061-0/+1
|
* examples: add missing include barriersEtienne Samson2019-11-061-0/+4
|
* Merge pull request #5113 from pks-t/pks/stash-perfEdward Thomson2019-08-111-0/+1
|\ | | | | stash: avoid recomputing tree when committing worktree
| * 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.
* | Merge pull request #5125 from albfan/wip/albfan/diff_buffersPatrick Steinhardt2019-08-011-1/+24
|\ \ | |/ |/| Compare buffers in diff example
| * examples: consolidate includes into "common.h"Patrick Steinhardt2019-07-051-0/+15
| | | | | | | | | | Consolidate all standard includes and defines into "common.h". This lets us avoid having to handle platform-specific things in multiple places.
| * Compare buffers in diff exampleAlberto Fanjul2019-07-051-1/+9
| |
* | 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: move MSVC compatibility macros into common headerPatrick Steinhardt2019-04-161-0/+5
| | | | | | | We currently have two locations in our examples where we define the same compatibility wrappers for MSVC. Move them into "common.h" to avoid duplication and make them available to other examples.
* examples: create common lg2 executablePatrick Steinhardt2019-02-151-5/+24
| | | | | | | | | | | | | | | | | | 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: merge common network codePatrick Steinhardt2019-02-151-0/+25
| | | | | | | | | | | | Right now, we have two sets of "common" code, one containing general common code and one containing network common code. As we intend to get rid of the network subdirectory and instead merge all examples into a single standalone executable, this distinction doesn't make a lot of sense now. Furthermore, the common network code is not that big. Let's get rid of the common network code by merging it into the general common code.
* examples: add a helper for boolean-style optionsEtienne Samson2018-07-071-0/+9
|
* examples: move refish resolution function in commonEtienne Samson2018-07-071-0/+5
|
* examples: Move xrealloc to common example codeEtienne Samson2018-01-251-0/+5
|
* examples: diff: parse correct types for line-diffoptsPatrick Steinhardt2016-10-101-0/+9
|
* describe: add exampleLinquize2014-10-121-0/+9
|
* Replace copyright topmatter in example filesBen Straub2013-11-021-3/+10
|
* Extract common example helpers and reorg examplesRussell Belfer2013-10-291-0/+80
This reorganizes a few of the examples so that the main function comes first with the argument parsing extracted into a helper that can come at the end of the file (so the example focuses more on the use of libgit2 instead of command line support). This also creates a shared examples/common.[ch] so that useful helper funcs can be shared across examples instead of repeated.