summaryrefslogtreecommitdiff
path: root/include/git2
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge pull request #875 from arrbee/fix-message-prettify-length-checkRussell Belfer2012-08-141-3/+5
|\ \ \ \ \ | | | | | | | | | | | | Fix message prettify length check
| * | | | | Make git_message_prettify return bytes writtenRussell Belfer2012-08-141-3/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you want to be absolutely safe with git_message_prettify, you can now pass a NULL pointer for the buffer and get back the number of bytes that would be copied into the buffer. This means that an error is a non-negative return code and a success will be greater than zero from this function.
* | | | | Merge pull request #871 from joshtriplett/fix-note_foreach-docsVicent Martí2012-08-131-1/+1
|\ \ \ \ \ | | | | | | | | | | | | git_note_foreach: Fix documentation for notes_ref parameter
| * | | | | git_note_foreach: Fix documentation for notes_ref parameterJosh Triplett2012-08-121-1/+1
| |/ / / /
* | | | | Merge pull request #870 from joshtriplett/fix-note_create-docsVicent Martí2012-08-131-2/+2
|\ \ \ \ \ | | | | | | | | | | | | git_note_oid: Fix the documentation to reference parameters using the correct names
| * | | | | git_note_oid: Fix the documentation to reference parameters using the ↵Josh Triplett2012-08-121-2/+2
| |/ / / / | | | | | | | | | | | | | | | correct names
* | | | | Merge pull request #872 from joshtriplett/fix-note_remove-docsVicent Martí2012-08-131-1/+1
|\ \ \ \ \ | | | | | | | | | | | | git_note_create: Copyediting on documentation for the oid parameter
| * | | | | git_note_remove: Copyediting on documentation for the oid parameterJosh Triplett2012-08-121-1/+1
| |/ / / /
* | | | | Fix incorrect array size in example for git_config_get_mappedJosh Triplett2012-08-121-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | In the documentation for git_config_get_mapped, the sample mapping array uses [3] but has 4 entries. Fix by dropping the size entirely and letting the compiler figure it out.
* | | | Export git_attr_valueJosh Triplett2012-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0c9eacf3d2c83256736a5bb2a240e73afd13d55f introduced the function git_attr_value and switched the GIT_ATTR_* macros to use it, but attempting to use that function leads to a linker error (undefined reference to `git_attr_value'). Export git_attr_value so programs can actually call it.
* | | | Merge remote-tracking branch 'arrbee/tree-walk-fixes' into developmentVicent Marti2012-08-0611-29/+67
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0310-29/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Fix git_tree_walk to return user errorRussell Belfer2012-07-261-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that an error code returned by the callback function of `git_tree_walk` will stop the iteration and get propagated back to the caller verbatim. Also, this adds a minor helper function `git_tree_entry_byoid` that searches a `git_tree` for an entry with the given OID. This isn't a fast function, but it's easier than writing the loop yourself as an external user of the library.
* | | | | Merge remote-tracking branch 'nulltoken/topic/amd64-compat' into developmentVicent Marti2012-08-0210-12/+12
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/netops.c src/netops.h src/oid.c
| * | | | | portability: Improve x86/amd64 compatibilitynulltoken2012-07-2410-12/+12
| | | | | |
* | | | | | Merge pull request #850 from libgit2/attr-exportVicent Martí2012-08-011-9/+25
|\ \ \ \ \ \ | | | | | | | | | | | | | | attr: Do not export variables externally
| * | | | | | attr: Do not export variables externallyVicent Marti2012-08-021-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #824 Exporting variables in a dynamic library is a PITA. Let's keep these values internally and wrap them through a helper method. This doesn't break the external API. @arrbee, aren't you glad I turned the `GIT_ATTR_` macros into function macros? :sparkles:
* | | | | | | Merge pull request #848 from carlosmn/pending-messageVicent Martí2012-08-011-0/+22
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | repository: add a getter and remove function for git's prepared message
| * | | | | | repository: add a getter and remove function for git's prepared messageCarlos Martín Nieto2012-08-011-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'git revert/cherry-pick/merge -n' commands leave .git/MERGE_MSG behind so that git-commit can find it. As we don't yet support these operations, users who are shelling out to let git perform these operations haven't had a convenient way to get this message. These functions allow the user to retrieve the message and remove it when she's created the commit.
* | | | | | | Add function to query for compile time settings.Sascha Cunz2012-08-011-0/+23
|/ / / / / /
* | | | | | Merge pull request #833 from carlosmn/odb-oneVicent Martí2012-07-312-0/+14
|\ \ \ \ \ \ | | | | | | | | | | | | | | odb: allow creating an ODB backend from a packfile index
| * | | | | | repo: add git_repository_wrap_odb() to wrap an ODBCarlos Martín Nieto2012-07-211-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Primarily useful when used together with git_odb_backend_one_pack().
| * | | | | | odb: allow creating an ODB backend from a packfile indexCarlos Martín Nieto2012-07-211-0/+1
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | git_odb_backend_one_packfile() allows us to create an ODB backend out of an .idx file.
* | | | | | 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
* | | | | Merge pull request #834 from carlosmn/network-callbacksVicent Martí2012-07-272-1/+35
|\ \ \ \ \ | | | | | | | | | | | | Add a struct for network callbacks
| * | | | | Add a struct for network callbacksCarlos Martín Nieto2012-07-212-1/+35
| |/ / / / | | | | | | | | | | | | | | | | | | | | Currently only update_tips is used, but it prepares the way for progress output during download.
* | | | | branch: Add `repository` argument to `create`Vicent Marti2012-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Yes, we can get the repository from the owner of the object, but having it marked explicitly makes the API more consistent.
* | | | | Merge remote-tracking branch 'nulltoken/topic/branch-rework' into developmentVicent Marti2012-07-272-29/+52
|\ \ \ \ \
| * | | | | refs: drop git_reference_remote_tracking_from_branch()nulltoken2012-07-241-21/+0
| | | | | |
| * | | | | branch: introduce git_branch_tracking()nulltoken2012-07-241-0/+16
| | | | | |
| * | | | | branch: make git_branch_move() reference basednulltoken2012-07-241-9/+4
| | | | | |
| * | | | | branch: slight git_branch_create() doc improvementnulltoken2012-07-241-2/+2
| | | | | |
| * | | | | branch: introduce git_reference_is_branch()nulltoken2012-07-241-0/+10
| | | | | |
| * | | | | branch: introduce git_branch_lookup()nulltoken2012-07-241-0/+24
| | | | | |
| * | | | | branch: change git_branch_create() to make it return a referencenulltoken2012-07-241-4/+3
| | |/ / / | |/| | |
* | | | | reflog: Rename `entry_drop` to `drop`Vicent Marti2012-07-271-1/+1
| | | | |
* | | | | Merge remote-tracking branch 'nulltoken/topic/reflog-delete' into developmentVicent Marti2012-07-271-8/+36
|\ \ \ \ \
| * | | | | reflog: prevent git_reflog_append() from persisting the reflog back to disknulltoken2012-07-251-9/+4
| | | | | |
| * | | | | reflog: prevent git_reflog_read() from chocking when no log exists yetnulltoken2012-07-251-0/+4
| | | | | |
| * | | | | reflog: introduce git_reflog_write()nulltoken2012-07-251-0/+9
| | | | | |
| * | | | | reflog: rename git_reflog_write() to git_reflog_append()nulltoken2012-07-251-2/+2
| | | | | |
| * | | | | reflog: introduce git_reflog_entry_drop()nulltoken2012-07-251-0/+20
| |/ / / /
* | | | | Remotes: Setter for url+pushurl; Getter for pushurlSascha Cunz2012-07-261-0/+30
| |_|/ / |/| | |
* | | | Add flag to turn off pathspec testing for diff and statusyorah2012-07-242-0/+4
|/ / /
* | | Merge pull request #818 from nulltoken/reworkVicent Martí2012-07-211-0/+17
|\ \ \ | |/ / |/| | Revparse rework
| * | object: introduce git_object_peel()nulltoken2012-07-171-0/+17
| | | | | | | | | | | | Partially fix #530
* | | attr: Rename the `git_attr__` exportsVicent Marti2012-07-151-8/+8
|/ / | | | | | | | | | | | | Pevents collisions with the original libgit, which also exports those exact symbols. Fixes #822
* | commit: properly export git_commit_nth_gen_ancestor()Carlos Martín Nieto2012-07-121-1/+1
| |
* | Merge pull request #789 from carlosmn/odb-foreachVicent Martí2012-07-122-0/+20
|\ \ | | | | | | odb: add git_odb_foreach()
| * | odb: add git_odb_foreach()Carlos Martín Nieto2012-07-032-0/+20
| | | | | | | | | | | | | | | Go through each backend and list every objects that exists in them. This allows fsck-like uses.