summaryrefslogtreecommitdiff
path: root/include/git2/blob.h
Commit message (Collapse)AuthorAgeFilesLines
* fix git_blob_create_fromchunks documentationtepas2015-12-161-2/+2
| | | putting `0.` at the start of the line turns it into a numbered list.
* blob: don't recomment using git_buf_growCarlos Martín Nieto2015-06-241-6/+4
| | | | | | | | | We currently recommend using `git_buf_grow` in order to make a buffer make an owned copy of the memory it points to. This is not behaviour we should encourage, so remove this recommendation. The function itself is not changed, as we need to remain compatible, but it will be changed not to allow usage on borrowed buffers.
* [Blob] Update documentation for is_binary.Ungureanu Marius2014-05-281-1/+1
| | | filter.h tells me that we check the first 8000 bytes.
* Const correctness!Jacques Germishuys2014-04-031-1/+1
|
* Some missing oid to id renamesRussell Belfer2014-01-301-2/+3
|
* Handle git_buf's from users more liberallyEdward Thomson2014-01-081-1/+1
|
* Update git_blob_create_fromchunks callback behavrRussell Belfer2013-12-111-24/+19
| | | | | | | The callback to supply data chunks could return a negative value to stop creation of the blob, but we were neither using GIT_EUSER nor propagating the return value. This makes things use the new behavior of returning the negative value back to the user.
* Merge git_buf and git_bufferRussell Belfer2013-09-171-5/+5
| | | | | | | | | | | This makes the git_buf struct that was used internally into an externally available structure and eliminates the git_buffer. As part of that, some of the special cases that arose with the externally used git_buffer were blended into the git_buf, such as being careful about git_buf objects that may have a NULL ptr and allowing for bufs with a valid ptr and size but zero asize as a way of referring to externally owned data.
* Start of filter API + git_blob_filtered_contentRussell Belfer2013-09-171-0/+32
| | | | | | | | | | This begins the process of exposing git_filter objects to the public API. This includes: * new public type and API for `git_buffer` through which an allocated buffer can be passed to the user * new API `git_blob_filtered_content` * make the git_filter type and GIT_FILTER_TO_... constants public
* Standardize cast versions of git_object accessorsRussell Belfer2013-04-291-17/+11
| | | | | | This removes the GIT_INLINE versions of the simple git_object accessors and standardizes them with a helper macro in src/object.h to build the function bodies.
* Remove GIT_SUCCESS from documentationMiquel Canes Gonzalez2013-03-241-1/+1
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Share git_diff_blobs/git_diff_blob_to_buffer codeRussell Belfer2013-01-071-2/+2
| | | | | | | This moves the implementation of these two APIs into common code that will be shared between the two. Also, this adds tests for the `git_diff_blob_to_buffer` API. Lastly, this adds some extra `const` to a few places that can use it.
* blob: introduce git_blob_is_binary()nulltoken2012-12-171-0/+13
|
* More external API cleanupVicent Marti2012-11-271-9/+23
| | | | | | Conflicts: src/branch.c tests-clar/refs/branches/create.c
* portability: Improve x86/amd64 compatibilitynulltoken2012-07-241-1/+1
|
* blob: add git_blob_create_fromchunks()nulltoken2012-06-071-0/+42
|
* errors: Rename the generic return codesVicent Martí2012-05-181-5/+5
|
* blob: Add git_blob_create_fromdisk()nulltoken2012-05-131-0/+12
| | | | This function will create blobs in the object database from files anywhere on the filesystem. This can be run against bare and non-bare repositories.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* Rename all `_close` methodsVicent Marti2011-11-261-3/+3
| | | | | There's no difference between `_free` and `_close` semantics: keep everything with the same name to avoid confusions.
* Cleanup legal dataVicent Marti2011-09-191-21/+3
| | | | | | | | | | 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-4/+4
| | | | an error code".
* Fix some random size_t vs. int conversion warningsSebastian Schuberth2011-09-081-1/+1
|
* Added methods to search objects of different typesMarc Pegon2011-06-061-0/+17
| | | | given an OID prefix.
* Do not return on `void` helper methodsVicent Marti2011-03-231-1/+1
| | | | MSVC doesn't swallow that.
* Add close wappers for commit, tree, tag and blobCarlos Martín Nieto2011-03-231-0/+18
| | | | | | | | In the same spirit that git_repository_lookup is no longer available, add wrappers so the users don't have to cast when closing their objects. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* I broke your bindingsVicent Marti2011-03-201-46/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hey. Apologies in advance -- I broke your bindings. This is a major commit that includes a long-overdue redesign of the whole object-database structure. This is expected to be the last major external API redesign of the library until the first non-alpha release. Please get your bindings up to date with these changes. They will be included in the next minor release. Sorry again! Major features include: - Real caching and refcounting on parsed objects - Real caching and refcounting on objects read from the ODB - Streaming writes & reads from the ODB - Single-method writes for all object types - The external API is now partially thread-safe The speed increases are significant in all aspects, specially when reading an object several times from the ODB (revwalking) and when writing big objects to the ODB. Here's a full changelog for the external API: blob.h ------ - Remove `git_blob_new` - Remove `git_blob_set_rawcontent` - Remove `git_blob_set_rawcontent_fromfile` - Rename `git_blob_writefile` -> `git_blob_create_fromfile` - Change `git_blob_create_fromfile`: The `path` argument is now relative to the repository's working dir - Add `git_blob_create_frombuffer` commit.h -------- - Remove `git_commit_new` - Remove `git_commit_add_parent` - Remove `git_commit_set_message` - Remove `git_commit_set_committer` - Remove `git_commit_set_author` - Remove `git_commit_set_tree` - Add `git_commit_create` - Add `git_commit_create_v` - Add `git_commit_create_o` - Add `git_commit_create_ov` tag.h ----- - Remove `git_tag_new` - Remove `git_tag_set_target` - Remove `git_tag_set_name` - Remove `git_tag_set_tagger` - Remove `git_tag_set_message` - Add `git_tag_create` - Add `git_tag_create_o` tree.h ------ - Change `git_tree_entry_2object`: New signature is `(git_object **object_out, git_repository *repo, git_tree_entry *entry)` - Remove `git_tree_new` - Remove `git_tree_add_entry` - Remove `git_tree_remove_entry_byindex` - Remove `git_tree_remove_entry_byname` - Remove `git_tree_clearentries` - Remove `git_tree_entry_set_id` - Remove `git_tree_entry_set_name` - Remove `git_tree_entry_set_attributes` object.h ------------ - Remove `git_object_new - Remove `git_object_write` - Change `git_object_close`: This method is now *mandatory*. Not closing an object causes a memory leak. odb.h ----- - Remove type `git_rawobj` - Remove `git_rawobj_close` - Rename `git_rawobj_hash` -> `git_odb_hash` - Change `git_odb_hash`: New signature is `(git_oid *id, const void *data, size_t len, git_otype type)` - Add type `git_odb_object` - Add `git_odb_object_close` - Change `git_odb_read`: New signature is `(git_odb_object **out, git_odb *db, const git_oid *id)` - Change `git_odb_read_header`: New signature is `(size_t *len_p, git_otype *type_p, git_odb *db, const git_oid *id)` - Remove `git_odb_write` - Add `git_odb_open_wstream` - Add `git_odb_open_rstream` odb_backend.h ------------- - Change type `git_odb_backend`: New internal signatures are as follows int (* read)(void **, size_t *, git_otype *, struct git_odb_backend *, const git_oid *) int (* read_header)(size_t *, git_otype *, struct git_odb_backend *, const git_oid *) int (* writestream)(struct git_odb_stream **, struct git_odb_backend *, size_t, git_otype) int (* readstream)( struct git_odb_stream **, struct git_odb_backend *, const git_oid *) - Add type `git_odb_stream` - Add enum `git_odb_streammode` Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Change the return type of `git_blob_rawcontent`Vicent Marti2011-03-051-1/+1
| | | | | | Should return `void *` for raw bytes. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Move the external includes folder from `src` to `include`Vicent Marti2011-03-031-0/+128
Signed-off-by: Vicent Marti <tanoku@gmail.com>