Commit Graph

24 Commits

Author SHA1 Message Date
Peter Pettersson
7dcc29fc46 Make enum in src,tests and examples C90 compliant by removing trailing comma. 2021-11-15 16:45:40 +01:00
Edward Thomson
eabbee0454 example: declare print_usage function 2021-11-11 17:21:32 -05:00
Edward Thomson
8be226148f examples: remove unused function 2021-11-11 17:21:32 -05:00
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
313908f9f5 examples: normalize decls and usage of options structs 2019-11-06 11:17:56 +01:00
Etienne Samson
4a4ad2bc83 examples: add comments to add.c 2019-11-06 11:17:55 +01:00
Etienne Samson
d4a593ef78 examples: modernize add code 2019-11-06 11:17:52 +01:00
Etienne Samson
cd5e33fbc2 global: DRY includes of assert.h 2019-11-06 11:08:23 +01:00
Etienne Samson
6cf4772684 examples/add: add explanatory comments and reformat 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
Patrick Steinhardt
fc29391950 examples: add: fix type casting warning 2016-10-10 09:04:42 +02:00
Carlos Martín Nieto
799e22ea0c Rename git_threads_ to git_libgit2_
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.
2014-11-08 23:46:39 +01:00
Miha
300f44125a - BUGFIX #2133 (@fourplusone) in smart_protocol.c
- added MSVC cmake definitions to disable warnings
- general.c is rewritten so it is ansi-c compatible and compiles ok on microsoft windows
- some MSVC reported warning fixes
2014-02-25 11:56:11 +01:00
Ben Straub
6cb831bd56 Replace copyright topmatter in example files 2013-11-02 05:33:26 -07:00
Ben Straub
dbfd283327 add.c: proper frontmatter 2013-10-30 07:21:12 -07:00
Ben Straub
e568bedf52 add.c example: deploy helpers, reorg 2013-10-30 06:08:54 -07:00
Russell Belfer
0c52b204c5 Make work if built with threading enabled 2013-09-09 11:07:17 -07:00
Krzysztof Adamski
b2395a8267 Only use callbacks when -n or -v in add example. 2013-09-09 11:01:31 -07:00
Krzysztof Adamski
04fd266584 Move statement after declarations in add example. 2013-09-09 11:01:31 -07:00
Krzysztof Adamski
9a0e42c673 Remove unnececery arguments priting in add example. 2013-09-09 11:01:30 -07:00
Krzysztof Adamski
813937ce4e Better usage info in add example. 2013-09-09 11:01:30 -07:00
Krzysztof Adamski
24d2322096 Add -u option to add example. 2013-09-09 11:01:30 -07:00
Krzysztof Adamski
e8fa14d3a3 Supported options information in add example. 2013-09-09 11:01:30 -07:00
Krzysztof Adamski
62020aa8f9 Adding add example. 2013-09-09 11:01:30 -07:00