summaryrefslogtreecommitdiff
path: root/include/git2
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | config: move next() and free() into the iteratorCarlos Martín Nieto2013-08-082-4/+28
| | | | | | | | | | | | | | | | | | | | Like we have in the references iterator, next and free belong in the iterator itself.
| * | | config: get_multivar -> get_multivar_foreachCarlos Martín Nieto2013-08-082-3/+3
| | | | | | | | | | | | | | | | | | | | The plain function will return an iterator, so move this one out of the way.
| * | | Don't typedef a pointerCarlos Martín Nieto2013-08-082-2/+2
| | | | | | | | | | | | | | | | Make the iterator structure opaque and make sure it compiles.
| * | | replaced foreach() with non callback based iterations in git_config_backendNico von Geyso2013-08-082-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new functions in struct git_config_backend: * iterator_new(...) * iterator_free(...) * next(...) The old callback based foreach style can still be used with `git_config_backend_foreach_match`
* | | | refs: add git_reference_is_tagNikolai Vladimirov2013-08-261-0/+9
| | | |
* | | | push: small documentation fixFraser Tweedale2013-08-251-1/+1
| |/ / |/| |
* | | Don't expose git_hash_ctx since it's internalEdward Thomson2013-08-191-3/+1
| | | | | | | | | | | | And doing so makes the mingw build choke.
* | | Merge pull request #1785 from libgit2/cmn/odb-hash-frontendVicent Martí2013-08-193-16/+72
|\ \ \ | | | | | | | | odb: move hashing to the frontend for streaming
| * | | odb: document git_odb_streamCarlos Martín Nieto2013-08-172-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | Clarify the role of each function and in particular mention that there is no need for the backend or stream to worry about the object's id, as it will be given when `finalize_write` is called.
| * | | odb: make it clearer that the id is calculated in the frontendCarlos Martín Nieto2013-08-172-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The frontend is in charge of calculating the id of the objects. Thus the backends should treat it as a read-only value. The positioning in the function signature made it seem as though it was an output parameter. Make the id const and move it from the front to behind the subject (backend or stream).
| * | | odb: perform the stream hashing in the frontendCarlos Martín Nieto2013-08-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Hash the data as it's coming into the stream and tell the backend what its name is when finalizing the write. This makes it consistent with the way a plain git_odb_write() performs the write.
| * | | odb: wrap the stream reading and writing functionsCarlos Martín Nieto2013-08-151-10/+39
| | | | | | | | | | | | | | | | | | | | | | | | This is in preparation for moving the hashing to the frontend, which requires us to handle the incoming data before passing it to the backend's stream.
* | | | index: report when it's lockedCarlos Martín Nieto2013-08-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Report the index being locked with its own error code in order to be able to differentiate, as a locked index is typically the result of a crashed process or concurrent access, both of which often require user intervention to fix.
* | | | Add new git_signature_default API using configRussell Belfer2013-08-161-0/+13
|/ / / | | | | | | | | | | | | This adds a new API for creating a signature that uses the config to look up "user.name" and "user.email".
* | | Include username in each credential typeCarlos Martín Nieto2013-08-121-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | Key-based authentication also needs an username, so include it in each one. Also stop assuming a default username of "git" in the ssh transport which has no business making such a decision.
* | | Merge pull request #1764 from ethomson/status_renames_from_rewritesRussell Belfer2013-08-091-1/+4
|\ \ \ | | | | | | | | Add rename from rewrites to status
| * | | Add rename from rewrites to statusEdward Thomson2013-08-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | In git_diff_paired_foreach, temporarily resort the index->workdir diff list by index path so that we can track a rename in the workdir from head->index->workdir.
* | | | Merge pull request #1738 from libgit2/diff-patch-content-sizeBen Straub2013-08-081-1/+23
|\ \ \ \ | |_|/ / |/| | | Add API for getting at git_diff_patch->content_size
| * | | Restore GIT_DIFF_LINE_BINARY usageRussell Belfer2013-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This restores the usage of GIT_DIFF_LINE_BINARY for the diff output line that reads "Binary files x and y differ" so that it can be optionally colorized independently of the file header.
| * | | Add hunk/file headers to git_diff_patch_sizeRussell Belfer2013-07-231-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows git_diff_patch_size to account for hunk headers and file headers in the returned size. This required some refactoring of the code that is used to print file headers so that it could be invoked by the git_diff_patch_size API. Also this increases the test coverage and fixes an off-by-one bug in the size calculation when newline changes happen at the end of the file.
| * | | Add git_diff_patch_size() APIRussell Belfer2013-07-221-0/+18
| | | | | | | | | | | | | | | | | | | | This adds a new API to get the size in bytes of the diffs in a git_diff_patch object.
* | | | More tests for ambiguous OIDs across packsRussell Belfer2013-08-051-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | The test coverage for ambiguous OIDs was pretty thin. This adds a bunch of new objects both in packs, across packs, and loose that match to 8 characters so that we can test various cases of ambiguous lookups.
* | | Update submodule documentationRussell Belfer2013-08-052-21/+81
| | | | | | | | | | | | Fixes #1762
* | | remote: fix git_remote_download() documentationCarlos Martín Nieto2013-07-231-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | The description of what the function does hasn't been true for quite a while. Change it to reflect the way it currently works. While here, remove an even older comment about missing features that have been implemented.
* | | Clean up some documentationCarlos Martín Nieto2013-07-235-9/+7
|/ / | | | | | | clang's docparser highlighted these.
* | Small grammar fix in docsAndy Lindeman2013-07-151-1/+1
| |
* | Add `git_remote_owner`Etienne Samson2013-07-151-0/+8
| |
* | Fixes return type documentationAndy Lindeman2013-07-141-1/+1
| |
* | Clarify docs for git_status_fileRussell Belfer2013-07-101-4/+4
| |
* | Add ignore_submodules to diff optionsRussell Belfer2013-07-103-44/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds correct support for an equivalent to --ignore-submodules in diff, where an actual ignore value can be passed to diff to override the per submodule settings in the configuration. This required tweaking the constants for ignore values so that zero would not be used and could represent an unset option to the diff. This was an opportunity to move the submodule values into include/git2/types.h and to rename the poorly named DEFAULT values for ignore and update constants to RESET instead. Now the GIT_DIFF_IGNORE_SUBMODULES flag is exactly the same as setting the ignore_submodules option to GIT_SUBMODULE_IGNORE_ALL (which is actually a minor change from the old behavior in that submodules will now be treated as UNMODIFIED deltas instead of being left out totally - if you set GIT_DIFF_INCLUDE_UNMODIFIED). This includes tests for the various new settings.
* | Submodule status improvementsRussell Belfer2013-07-101-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the way that submodule status is checked to bypass just about all of the caching in the submodule object. Based on the ignore value, it will try to do the minimum work necessary to find the current status of the submodule - but it will actually go to disk to get all of the current values. This also removes the custom refcounting stuff in favor of the common git_refcount style. Right now, it is still for internal purposes only, but it should make it easier to add true submodule refcounting in the future with a public git_submodule_free call that will allow bindings not to worry about the submodule object getting freed from underneath them.
* | Add BARE option to git_repository_open_extRussell Belfer2013-07-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | This adds a BARE option to git_repository_open_ext which allows a fast open path that still knows how to read gitlinks and to search for the actual .git directory from a subdirectory. `git_repository_open_bare` is still simpler and faster, but having a gitlink aware fast open is very useful for submodules where we want to quickly be able to peek at the HEAD and index data without doing any other meaningful repo operations.
* | Add API to get path to index fileRussell Belfer2013-07-101-0/+8
| |
* | Add git_pathspec_match_diff APIRussell Belfer2013-07-102-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an additional pathspec API that will match a pathspec against a diff object. This is convenient if you want to handle renames (so you need the whole diff and can't use the pathspec constraint built into the diff API) but still want to tell if the diff had any files that matched the pathspec. When the pathspec is matched against a diff, instead of keeping a list of filenames that matched, instead the API keeps the list of git_diff_deltas that matched and they can be retrieved via a new API git_pathspec_match_list_diff_entry. There are a couple of other minor API extensions here that were mostly for the sake of convenience and to reduce dependencies on knowing the internal data structure between files inside the library.
* | Improve include/git2/pathspec.h docsRussell Belfer2013-07-101-29/+46
| |
* | Add raw header access to commit APIRussell Belfer2013-07-101-0/+8
| |
* | Add public API for pathspec matchingRussell Belfer2013-07-102-0/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new public API for compiling pathspecs and matching them against the working directory, the index, or a tree from the repository. This also reworks the pathspec internals to allow the sharing of code between the existing internal usage of pathspec matching and the new external API. While this is working and the new API is ready for discussion, I think there is still an incorrect behavior in which patterns are always matched against the full path of an entry without taking the subdirectories into account (so "s*" will match "subdir/file" even though it wouldn't with core Git). Further enhancements are coming, but this was a good place to take a functional snapshot.
* | Merge pull request #1704 from arrbee/kill-status-index-then-workdirVicent Martí2013-07-091-8/+7
|\ \ | | | | | | Remove GIT_STATUS_SHOW_INDEX_THEN_WORKDIR option
| * | Remove GIT_STATUS_SHOW_INDEX_THEN_WORKDIR optionRussell Belfer2013-07-031-8/+7
| | | | | | | | | | | | | | | | | | This option serves no benefit now that the git_status_list API is available. It was of questionable value before and now it would just be a bad idea to use it rather than the indexed API.
* | | Merge pull request #1695 from arrbee/fix-1695Vicent Martí2013-07-092-40/+50
|\ \ \ | | | | | | | | API should not be ifdeffed
| * | | Add GIT_CAP_SSH if library was built with SSHRussell Belfer2013-07-091-1/+2
| | | | | | | | | | | | | | | | | | | | This also adds a test that actually calls git_libgit2_capabilities and git_libgit2_version.
| * | | Make SSH APIs present even without SSH supportRussell Belfer2013-07-091-39/+48
| |/ / | | | | | | | | | | | | | | | The SSH APIs will just return an error code and state that the library was built without SSH support if they are called in that case.
* | | Make the git_signature const in the stash API.Etienne Samson2013-07-091-1/+1
|/ /
* | Fix small typo in docs for git_repository_message.Andrej Mitrovic2013-07-021-1/+1
| |
* | Fix docs to use proper enum names that exist.Andrej Mitrovic2013-07-012-9/+9
| |
* | libgit2 v0.19.0 "gut merge"v0.19.0Vicent Marti2013-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor point release! We got a lot of rather large features that we wanted to get settled in: - New (threadsafe) cache for objects - Iterator for Status - New Merge APIs - SSH support on *NIX - Function context on diff - Namespaces support - Index add/update/remove with wildcard support - Iterator for References - Fetch and push refspecs for Remotes - Rename support in Status - New 'sys/` namespace for external headers with low-level APIs As always, this comes with hundreds of bug fixes and performance improvements. We're faster and better than ever. And we haven't broken many APIs this time! Build stuff.
* | Fixed most documentation header bugsAndreas Linde2013-06-2417-35/+35
| | | | | | | | | | | | | | | | | | | | | | 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 target directory to checkoutRussell Belfer2013-06-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability for checkout to write to a target directory instead of having to use the working directory of the repository. This makes it easier to do exports of repository data and the like. This is similar to, but not quite the same as, the --prefix option to `git checkout-index` (this will always be treated as a directory name, not just as a simple text prefix). As part of this, the workdir iterator was extended to take the path to the working directory as a parameter and fallback on the git_repository_workdir result only if it's not specified. Fixes #1332
* | Fix checkout of modified file when missing from wdRussell Belfer2013-06-211-0/+2
| | | | | | | | | | | | | | | | | | | | This fixes the checkout case when a file is modified between the baseline and the target and yet missing in the working directory. The logic for that case appears to have been wrong. This also adds a useful checkout notify callback to the checkout test helpers that will count notifications and also has a debug mode to visualize what checkout thinks that it's doing.
* | Add status flags to force output sort orderRussell Belfer2013-06-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Files in status will, be default, be sorted according to the case insensitivity of the filesystem that we're running on. However, in some cases, this is not desirable. Even on case insensitive file systems, 'git status' at the command line will generally use a case sensitive sort (like 'ls'). Some GUIs prefer to display a list of file case insensitively even on case-sensitive platforms. This adds two new flags: GIT_STATUS_OPT_SORT_CASE_SENSITIVELY and GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY that will override the default sort order of the status output and give the user control. This includes tests for exercising these new options and makes the examples/status.c program emulate core Git and always use a case sensitive sort.