Commit Graph

26 Commits

Author SHA1 Message Date
Carlos Martín Nieto
385449b1df note: use a git_buf to return the default namespace
The caller has otherwise no way to know how long the string will be
allocated or ability to free it.

This fixes #2944.
2015-03-17 20:50:02 +01:00
Carlos Martín Nieto
bfa6cdbf13 notes: fix comments for git_note_next()
The iterator is the last argument. There is also no returned notes, just
ids, so the comment about freeing is out of place.
2014-12-06 04:20:10 +01:00
Carlos Martín Nieto
21083a7129 notes: move the notes name argument
Make it consistent between git_note_create() and git_note_remote() by
putting it after the repository.
2014-12-06 04:20:09 +01:00
Edward Thomson
bad4937ea5 Introduce git_note_author, git_note_committer 2014-10-26 22:59:29 -04:00
Carlos Martín Nieto
d0a3de720e note: rename the id getter to git_note_id()
This was left over when we did the general switch.
2014-01-24 11:18:51 +01:00
Russell Belfer
373cf6a932 Update docs for new callback return value behavior 2013-12-11 10:57:50 -08:00
Carlos Martín Nieto
c05a55b056 Clean up some documentation
clang's docparser highlighted these.
2013-07-23 09:40:19 +02:00
Nico von Geyso
f7b1850215 fixed minor issues with new note iterator
* fixed style issues
* use new iterator functions for git_note_foreach()
2013-03-06 22:36:19 +01:00
Nico von Geyso
1a90dcf64e use git_note_iterator type instead of non-public git_iterator one 2013-03-06 19:07:56 +01:00
Nico von Geyso
6edb427b76 basic note iterator implementation
* git_note_iterator_new() - create a new note iterator
* git_note_next() - retrieves the next item of the iterator
2013-03-06 17:01:33 +01:00
Edward Thomson
359fc2d241 update copyrights 2013-01-08 17:31:27 -06:00
Nikolai Vladimirov
8716b499e2 add option to allow git note overwrite 2013-01-03 16:31:36 +02:00
Russell Belfer
2bd5998c9c Remove git_note_data structure 2012-11-27 14:47:39 -08:00
Ben Straub
de5596bfd6 API updates for notes.h/c. 2012-11-27 13:18:30 -08:00
nulltoken
5fd17fc217 notes: slight documentation enhancements 2012-08-15 17:50:02 +02:00
Vicent Martí
e08ca0d4a7 Merge pull request #871 from joshtriplett/fix-note_foreach-docs
git_note_foreach: Fix documentation for notes_ref parameter
2012-08-13 21:04:27 -07:00
Vicent Martí
a6ee620185 Merge pull request #870 from joshtriplett/fix-note_create-docs
git_note_oid: Fix the documentation to reference parameters using the correct names
2012-08-13 21:02:35 -07:00
Josh Triplett
39a60efd39 git_note_remove: Copyediting on documentation for the oid parameter 2012-08-12 11:31:12 -07:00
Josh Triplett
d45ada03cf git_note_foreach: Fix documentation for notes_ref parameter 2012-08-12 06:31:42 -07:00
Josh Triplett
22408f4d5f git_note_oid: Fix the documentation to reference parameters using the correct names 2012-08-12 05:53:30 -07:00
Russell Belfer
5dca201072 Update iterators for consistency across library
This updates all the `foreach()` type functions across the library
that take callbacks from the user to have a consistent behavior.
The rules are:

* A callback terminates the loop by returning any non-zero value
* Once the callback returns non-zero, it will not be called again
  (i.e. the loop stops all iteration regardless of state)
* If the callback returns non-zero, the parent fn returns GIT_EUSER
* Although the parent returns GIT_EUSER, no error will be set in
  the library and `giterr_last()` will return NULL if called.

This commit makes those changes across the library and adds tests
for most of the iteration APIs to make sure that they follow the
above rules.
2012-08-03 17:08:01 -07:00
Vicent Martí
e172cf082e errors: Rename the generic return codes 2012-05-18 01:26:26 +02:00
nulltoken
ee7680d53b notes: make git_note_foreach() callback signature easier to cope with from a binding perspective 2012-05-16 21:51:45 +02:00
nulltoken
86ecd84427 notes: add git_notes_foreach() 2012-05-14 22:07:42 +02:00
Michael Schubert
630c5a4a54 notes: add git_note_default_ref()
Add git_note_default_ref to allow easy retrieval of the currently set
default notes reference.
2012-05-03 22:31:29 +02:00
schu
bf477ed4a8 Add git notes API
This commit adds basic git notes support to libgit2, namely:

* git_note_read
* git_note_message
* git_note_oid
* git_note_create
* git_note_remove

In the long run, we probably want to provide some convenience callback
mechanism for merging and moving (filter-branch) notes.

Signed-off-by: schu <schu-github@schulog.org>
2012-02-15 20:32:14 +01:00