summaryrefslogtreecommitdiff
path: root/include/git2/oid.h
Commit message (Collapse)AuthorAgeFilesLines
* oid functions: return an intEdward Thomson2020-01-241-5/+10
| | | | | Stop returning a void for functions, future-proofing them to allow them to fail.
* oid: `is_zero` instead of `iszero`Edward Thomson2019-06-161-1/+1
| | | | | | The only function that is named `issomething` (without underscore) was `git_oid_iszero`. Rename it to `git_oid_is_zero` for consistency with the rest of the library.
* git_error: use full class name in public error APIEdward Thomson2019-01-221-1/+1
| | | | | | | | | Move to the `git_error` name in error-related functions, deprecating the `giterr` functions. This means, for example, that `giterr_last` is now `git_error_last`. The old names are retained for compatibility. This only updates the public API; internal API and function usage remains unchanged.
* Update docs for git_oid_fromstrn and pMatthew Plough2017-01-271-5/+4
|
* Fix doc comment formattingBen Chatelain2015-02-101-1/+1
|
* oid: Export `git_oid_tostr_s` instead of `_allocfmt`vmg/tostr_sVicent Marti2014-08-181-4/+8
| | | | | | The old `allocfmt` is of no use to callers, as they are not able to free the returned buffer. Export a new API that returns a static string that doesn't need to be freed.
* Make git_oid_equal a non-inline APIRussell Belfer2014-02-201-4/+1
|
* Merge pull request #1820 from linquize/git_oid_streqVicent Martí2013-09-011-2/+1
|\ | | | | Update documentation of git_oid_streq to remove outdated error code
| * Update documentation of git_oid_streq to remove outdated error codeLinquize2013-08-311-2/+1
| |
* | oid: git_oid_shorten_add() sets GITERR_INVALID when OID set is fullLinquize2013-08-311-2/+2
|/
* Fixed most documentation header bugsAndreas Linde2013-06-241-3/+3
| | | | | | | | | | | Fixed a few header @param and @return typos with the help of -Wdocumentation in Xcode. The following warnings have not been fixed: common.h:213 - Not sure how the documentation format is for '...' notes.h:102 - Correct @param name but empty text notes.h:111 - Correct @param name but empty text pack.h:140 - @return missing text pack.h:148 - @return missing text
* Add git_oid_nfmt - a flexible OID formatterRussell Belfer2013-05-171-4/+17
| | | | | | I frequently want to the the first N digits of an OID formatted as a string and I'd like it to be efficient. This function makes that easy and I could rewrite the OID formatters in terms of it.
* Some cleanupsRussell Belfer2013-04-291-9/+0
| | | | | Removed useless prototype and renamed object typecast functions declaration macro.
* Make git_oid_cmp public and add git_oid__cmpRussell Belfer2013-04-291-13/+1
|
* Add git_oid_strcmp and use it for git_oid_streqRussell Belfer2013-04-291-0/+10
| | | | | | | | Add a new git_oid_strcmp that compares a string OID with a hex oid for sort order, and then reimplement git_oid_streq using it. This actually should speed up git_oid_streq because it only reads as far into the string as it needs to, whereas previously it would convert the whole string into an OID and then use git_oid_cmp.
* Introduce git_oid_compare, an exported oid cmpRussell Belfer2013-04-291-0/+9
|
* Implement GIT_STATUS_OPT_EXCLUDE_SUBMODULESRussell Belfer2013-03-251-1/+1
| | | | | | | | | | | This option has been sitting unimplemented for a while, so I finally went through and implemented it along with some tests. As part of this, I improved the implementation of GIT_DIFF_IGNORE_SUBMODULES so it be more diligent about avoiding extra work and about leaving off delta records for submodules to the greatest extent possible (though it may include them still if you are request TYPECHANGE records).
* Added an oid function that accepts nul-terminated stringsXavier L2013-03-211-0/+10
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* API updates for oid.hBen Straub2012-11-271-16/+15
|
* Working implementation of git_submodule_statusRussell Belfer2012-08-241-0/+2
| | | | | | | | | | | | | This is a big redesign of the git_submodule_status API and the implementation of the redesigned API. It also fixes a number of bugs that I found in other parts of the submodule API while writing the tests for the status part. This also fixes a couple of bugs in the iterators that had not been noticed before - one with iterating when there is a gitlink (i.e. separate-work-dir) and one where I was treating anything even vaguely submodule-like as a submodule, more aggressively than core git does.
* Merge remote-tracking branch 'nulltoken/topic/amd64-compat' into developmentVicent Marti2012-08-021-1/+1
|\ | | | | | | | | | | | | Conflicts: src/netops.c src/netops.h src/oid.c
| * portability: Improve x86/amd64 compatibilitynulltoken2012-07-241-1/+1
| |
* | git_oid_cmp: inline memcmp by hand to optimizeMichael Schubert2012-07-291-1/+25
|/ | | | | | | | | git.git uses an inlined hashcmp function instead of memcmp, since it performes much better when comparing hashes (most hashes compared diverge within the first byte). Measurements and rationale for the curious reader: http://thread.gmane.org/gmane.comp.version-control.git/172286
* Fix spelling errors.Bruce Mitchener2012-05-191-1/+1
|
* errors: Rename the generic return codesVicent Martí2012-05-181-3/+3
|
* Add missing GIT_EXTERN declarationsSascha Cunz2012-05-141-3/+3
|
* Rename git_oid_to_string to git_oid_tostrAuthmillenon2012-03-061-1/+1
| | | | | To conform the naming scheme of git_oid_fromstr we should change the name of git_oid_to_string to git_oid_tostr.
* Update diff to use iteratorsRussell Belfer2012-03-021-0/+5
| | | | | | | | | | | | | This is a major reorganization of the diff code. This changes the diff functions to use the iterators for traversing the content. This allowed a lot of code to be simplified. Also, this moved the functions relating to outputting a diff into a new file (diff_output.c). This includes a number of other changes - adding utility functions, extending iterators, etc. plus more tests for the diff code. This also takes the example diff.c program much further in terms of emulating git-diff command line options.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* global: Properly use `git__` memory wrappersVicent Marti2011-10-281-1/+1
| | | | | Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
* oid: Add git_oid_streq() which checks if an oid and an hex formatted string ↵nulltoken2011-10-131-0/+10
| | | | are equal
* Tabify everythingVicent Marti2011-09-191-13/+13
| | | | | | There were quite a few places were spaces were being used instead of tabs. Try to catch them all. This should hopefully not break anything. Except for `git blame`. Oh well.
* 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-2/+2
| | | | an error code".
* Modify struct definition to enable forward declare with C++ compiler,Lambert CLARA2011-07-251-2/+3
| | | | thus avoid including C library's header in C++ header.
* cleanup: remove trailing spacesKirill A. Shutemov2011-07-011-1/+1
| | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
* Remove redundant methods from the APIVicent Marti2011-06-281-0/+13
| | | | | | | | | | | | | | | 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.
* oid: Uniformize ncmp methodsVicent Marti2011-06-161-4/+11
| | | | Drop redundant methods. The ncmp method is now public
* oid: Rename methodsVicent Marti2011-06-161-2/+2
| | | | | Yeah. Finally. Fuck the old names, this ain't POSIX and they don't make any sense at all.
* fix gid_ misspellingScott Chacon2011-06-141-2/+2
|
* Renamed git_oid_match to git_oid_ncmp.Marc Pegon2011-06-061-1/+1
| | | | | | As suggested by carlosmn, git_oid_ncmp would probably be a better name than git_oid_match, for it does the same as git_oid_cmp but only up to a certain amount of hex digits.
* Changed return value of git_oid_match to be consistent with the other ↵Marc Pegon2011-06-011-1/+1
| | | | compare methods (0 means oids match). Added method to compare prefixes of hex formatted oids.
* Added a GIT_OID_MINPREFIXLEN constant to define the minimum length allowed ↵Marc Pegon2011-06-011-0/+4
| | | | for oid prefixes (set to 4, like in git). Consequently updated some object lookup methods and their documentation.
* Added error for ambiguous oid prefixes. Added methods to compare the first ↵Marc Pegon2011-06-011-0/+10
| | | | nth hexadecimal characters (i.e. packets of 4 bits) of OIDs.
* Add `git_oid_shorten` (unique OID minimzer)Vicent Marti2011-03-141-0/+54
| | | | | | | | | Set of methods to find the minimal-length to uniquely identify every OID in a list. Useful for GUI applications, commit logs and so on. Includes stress test. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Move the external includes folder from `src` to `include`Vicent Marti2011-03-031-0/+137
Signed-off-by: Vicent Marti <tanoku@gmail.com>