summaryrefslogtreecommitdiff
path: root/include/git2/refs.h
Commit message (Collapse)AuthorAgeFilesLines
...
* push: properly handle tagsMichael Schubert2013-01-091-1/+1
| | | | | Currently, push doesn't really handle tags when queueing objects. Fix it.
* Relax refspecs accepted by pushJameson Miller2013-01-091-1/+1
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Merge pull request #1115 from ben/struct-versionsVicent Martí2012-12-051-1/+1
|\ | | | | Version info for public structs
| * Cleanup nitpicky thingsBen Straub2012-11-301-1/+1
| |
* | object: refine git_object_peel() error reportnulltoken2012-12-011-2/+3
| |
* | refs: Deploy EINVALIDSPEC usagenulltoken2012-12-011-13/+21
|/
* Update callback fn ptr for git_reference_foreachRussell Belfer2012-11-271-1/+7
| | | | As part of API review, use a typedef for the callback fn ptr.
* Rename ref and reflog apis for consistencyBen Straub2012-11-271-24/+25
|
* Improve docs, examples, warningsRussell Belfer2012-11-011-130/+154
| | | | | | This improves docs in some of the public header files, cleans up and improves some of the example code, and fixes a couple of pedantic warnings in places.
* Separated git_strarray from common.h. Added doxy comments.Paul Thompson2012-10-111-0/+1
|
* refs: introduce git_reference_is_valid_name()nulltoken2012-09-251-1/+12
|
* refs: make git_reference_normalize_name() accept refspec patternnulltoken2012-09-251-2/+0
|
* refs: introduce git_reference_peel()nulltoken2012-09-061-0/+20
| | | | Fix #530
* Merge branch 'branch-delete-ref' into developmentVicent Marti2012-08-271-0/+10
|\ | | | | | | | | Conflicts: include/git2/refs.h
| * branch: Change `git_branch_delete` to take a refbranch-delete-refVicent Marti2012-08-261-0/+10
| |
* | refs: expose git_reference_normalize_name()nulltoken2012-08-271-0/+48
|/
* refs: fix missing parameter documentationnulltoken2012-08-151-0/+2
|
* Merge remote-tracking branch 'arrbee/tree-walk-fixes' into developmentVicent Marti2012-08-061-2/+3
|\ | | | | | | | | | | | | | | | | Conflicts: src/notes.c src/transports/git.c src/transports/http.c src/transports/local.c tests-clar/odb/foreach.c
| * Update iterators for consistency across libraryRussell Belfer2012-08-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | refs: drop git_reference_remote_tracking_from_branch()nulltoken2012-07-241-21/+0
| |
* | branch: introduce git_reference_is_branch()nulltoken2012-07-241-0/+10
|/
* refs: introduce git_reference_remote_tracking_from_branch()nulltoken2012-07-121-0/+21
|
* refs: add git_reference_has_log()nulltoken2012-07-071-0/+10
|
* references: introduce git_reference_foreach_glob()nulltoken2012-06-221-1/+30
|
* Fix spelling errors.Bruce Mitchener2012-05-191-2/+2
|
* errors: Rename the generic return codesVicent Martí2012-05-181-13/+13
|
* Properly tag all `enums` with a `_t`Vicent Martí2012-05-181-1/+1
|
* refs: git_reference_listall -> git_reference_listVicent Martí2012-05-181-1/+1
|
* Rename to git_reference_name_to_oidRussell Belfer2012-04-231-1/+2
|
* Add git_reference_lookup_oid and lookup_resolvedRussell Belfer2012-04-171-0/+19
| | | | | | | | | | | | | | Adds a new public reference function `git_reference_lookup_oid` that directly resolved a reference name to an OID without returning the intermediate `git_reference` object (hence, no free needed). Internally, this adds a `git_reference_lookup_resolved` function that combines looking up and resolving a reference. This allows us to be more efficient with memory reallocation. The existing `git_reference_lookup` and `git_reference_resolve` are reimplmented on top of the new utility and a few places in the code are changed to use one of the two new functions.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* reference_rename: don't delete the reflogschu2011-11-211-0/+5
| | | | | | | | reference_rename used to delete an old reflog file when renaming a reference to not confuse git.git. Don't do this anymore but let the user take care of writing a reflog entry. Signed-off-by: schu <schu-github@schulog.org>
* refs: Partial rewrite for read-only refsVicent Marti2011-11-061-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | This new version of the references code is significantly faster and hopefully easier to read. External API stays the same. A new method `git_reference_reload()` has been added to force updating a memory reference from disk. In-memory references are no longer updated automagically -- this was killing us. If a reference is deleted externally and the user doesn't reload the memory object, nothing critical happens: any functions using that reference should fail gracefully (e.g. deletion, renaming, and so on). All generated references from the API are read only and must be free'd by the user. There is no reference counting and no traces of generated references are kept in the library. There is no longer an internal representation for references. There is only one reference struct `git_reference`, and symbolic/oid targets are stored inside an union. Packfile references are stored using an optimized struct with flex array for reference names. This should significantly reduce the memory cost of loading the packfile from disk.
* refs: split internal and external referencesschu2011-11-061-10/+21
| | | | | | | | | | | | | | | | | Currently libgit2 shares pointers to its internal reference cache with the user. This leads to several problems like invalidation of reference pointers when reordering the cache or manipulation of the cache from user side. Give each user its own git_reference instead of leaking the internal representation (struct reference). Add the following new API functions: * git_reference_free * git_reference_is_packed Signed-off-by: schu <schu-github@schulog.org>
* Cleanup legal dataVicent Marti2011-09-191-22/+4
| | | | | | | | | | 1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
* Standardized doxygen @return lines for int functions to say "GIT_SUCCESS or ↵David Boyce2011-09-131-9/+9
| | | | an error code".
* cleanup: remove trailing spacesKirill A. Shutemov2011-07-011-4/+4
| | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
* refs: Remove duplicate rename methodVicent Marti2011-06-291-15/+1
| | | | `git_reference_rename` now takes a `force` flag
* Remove redundant methods from the APIVicent Marti2011-06-281-42/+8
| | | | | | | | | | | | | | | A bunch of redundant methods have been removed from the external API. - All the reference/tag creation methods with `_f` are gone. The force flag is now passed as an argument to the normal create methods. - All the different commit creation methods are gone; commit creation now always requires a `git_commit` pointer for parents and a `git_tree` pointer for tree, to ensure that corrupted commits cannot be generated. - All the different tag creation methods are gone; tag creation now always requires a `git_object` pointer to ensure that tags are not created to inexisting objects.
* Update documentationVicent Marti2011-06-161-1/+1
| | | | Fix all the missmatched arguments in the docs
* refs: Rename git_referece_listcb to _foreachVicent Marti2011-06-161-4/+3
| | | | Same name as `git_config_foreach`
* Enforce coding conventions in refs.cVicent Marti2011-03-291-3/+3
| | | | | Internal methods are static and without the git prefix. 'Force' methods have a `_f` prefix to match the other 'force' methods.
* Fix documentation copy errorCarlos Martín Nieto2011-03-291-2/+2
| | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Allow forcing the creation or renaming of referencesCarlos Martín Nieto2011-03-291-0/+56
| | | | | | | | | | | | Add internal reference create and rename functions which take a force parameter, telling them to overwrite an existing reference if it exists. These functions try to update the reference if it's of the same type as the one it's going to be replaced by. Otherwise the old reference becomes invalid. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* New external API method: `git_reference_listcb`Vicent Marti2011-03-251-0/+23
| | | | | | | | | | | | | | List all the references in the repository, calling a custom callback for each one. The listed references may be filtered by type, or using a bitwise OR of several types. Use the magic value `GIT_REF_LISTALL` to obtain all references, including packed ones. The `callback` function will be called for each of the references in the repository, and will receive the name of the reference and the `payload` value passed to this method.
* Add new method `git_reference_listall`Vicent Marti2011-03-141-0/+23
| | | | | | | Lists all the references in a repository. Listing may be filtered by reference type. This should applease Lord Clem.
* Move the external includes folder from `src` to `include`Vicent Marti2011-03-031-0/+223
Signed-off-by: Vicent Marti <tanoku@gmail.com>