Commit Graph

29 Commits

Author SHA1 Message Date
Ben Straub
83e1efbf46 Update files that reference tests-clar 2013-11-14 14:10:32 -08:00
Ben Straub
6cb831bd56 Replace copyright topmatter in example files 2013-11-02 05:33:26 -07:00
Carlos Martín Nieto
2b562c3a1e refs: remove the OID/SYMBOLIC filtering
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.
2013-05-11 11:20:38 +02:00
Vicent Marti
0d3ccf0b28 examples: Don't print weird characters 2013-04-10 16:41:05 +02:00
Ben Straub
f8591e519a General example: run against testrepo.git
Fixes #1455
2013-04-04 11:44:50 -07:00
Russell Belfer
a7ed746093 Add rudimentary error checks and reformat comments
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).
2013-02-15 15:58:13 -08:00
Carlos Scheidegger
ef41ab880c removed other references to api.html 2013-02-06 17:37:51 -05:00
Ben Straub
f45d51ff8e API updates for index.h 2012-11-27 13:18:28 -08:00
Russell Belfer
793c438559 Update diff callback param order
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.
2012-11-27 13:18:28 -08:00
Russell Belfer
e120123e36 API review / update for tree.h 2012-11-27 13:18:28 -08:00
Ben Straub
bac695b58c Examples: fix reference names 2012-11-27 13:18:28 -08:00
nulltoken
aa8a76eff9 tag: rename git_tag_type to git_tag_target_type 2012-11-17 05:41:20 -08:00
Edward Thomson
f45ec1a076 index refactoring 2012-10-29 20:04:21 -05:00
Carlos Martín Nieto
2af1c26641 examples: fix config getter param order 2012-09-30 11:02:53 +02:00
Scott J. Goldman
ab4aa138ad Fix examples/general.c compilation
git_reference_listall() -> git reference_list()
2012-05-20 00:40:31 -07:00
Vicent Martí
e172cf082e errors: Rename the generic return codes 2012-05-18 01:26:26 +02:00
Russell Belfer
706a9974a2 Basic setup for profiling
This fixes the examples so they will build and adds a PROFILE
option to the CMakeFile that enabled gprof info on non-Windows
2012-05-17 13:05:17 -07:00
Carlos Martín Nieto
2866c01685 examples: use git_repository_odb instead of _database 2012-01-13 18:20:13 +01:00
Vicent Marti
45e79e3701 Rename all _close methods
There's no difference between `_free` and `_close` semantics: keep
everything with the same name to avoid confusions.
2011-11-26 08:48:00 +01:00
Brandon Casey
54ccc71786 examples/general.c: update for recent API renaming of git_config_get_int
git_config_get_int --> git_config_get_int32
2011-11-05 18:01:32 -05:00
David Boyce
784b3b494f Fixed typo in example Makefile code and slimmed it down more.
Reverted signature of git_signature_new.
Removed error check wrappers (voted down). Made Makefile
work out of the box on Linux and Solaris when standard
cmake build instructions for the library are followed.
2011-09-15 23:15:38 -04:00
David Boyce
0251733e01 Changes to allow examples/*.c to compile and link. This required on
change to the signature of an API function (git_signature_new).
Also, the examples/general.c had a lot of unchecked return values
which were addresed with a couple of macros. The resulting example
still does not work correctly but at least now it fails with an
error message rather than not compiling or dumping core. Example
runtime issues may be addressed in a later commit.
2011-09-12 23:39:47 -04:00
Kirill A. Shutemov
6f2b0a3ae2 examples/general: fix misc warnings
examples/general.c:393:25: warning: unused variable ‘reftarget’ [-Wunused-variable]
examples/general.c:357:19: warning: unused variable ‘e’ [-Wunused-variable]
examples/general.c:444:1: warning: control reaches end of non-void function [-Wreturn-type]

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-07-05 14:20:10 +03:00
Kirill A. Shutemov
d6d877d20f examples/general: fix warnings on not handled reference type in switch
examples/general.c:402:5: warning: enumeration value ‘GIT_REF_INVALID’ not handled in switch [-Wswitch]
examples/general.c:402:5: warning: enumeration value ‘GIT_REF_PACKED’ not handled in switch [-Wswitch]
examples/general.c:402:5: warning: enumeration value ‘GIT_REF_HAS_PEEL’ not handled in switch [-Wswitch]
examples/general.c:402:5: warning: enumeration value ‘GIT_REF_LISTALL’ not handled in switch [-Wswitch]

Signe-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-07-05 14:20:10 +03:00
Kirill A. Shutemov
51cc50a37d examples/general: fix git_commit_create_v() arguments type
general.c:208: warning: passing argument 7 of 'git_commit_create_v' from incompatible pointer type

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-07-05 14:20:10 +03:00
Kirill A. Shutemov
932d1baf29 cleanup: remove trailing spaces
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-07-01 18:02:56 +02:00
Vicent Marti
920e000d38 config: Update examples 2011-06-18 01:17:58 +02:00
Vicent Marti
fa48608ec3 oid: Rename methods
Yeah. Finally. Fuck the old names, this ain't POSIX
and they don't make any sense at all.
2011-06-16 02:36:21 +02:00
Scott Chacon
96da90ae1f update examples content to be compilable and up to date 2011-06-15 09:40:06 -07:00