summaryrefslogtreecommitdiff
path: root/include/git2
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | Diff API cleanupRussell Belfer2013-10-152-195/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lays groundwork for separating formatting options from diff creation options. This groups the formatting flags separately from the diff list creation flags and reorders the options. This also tweaks some APIs to further separate code that uses patches from code that just looks at git_diffs.
| * | | | | | Rename diff objects and split patch.hRussell Belfer2013-10-113-310/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes no functional change to diff but renames a couple of the objects and splits the new git_patch (formerly git_diff_patch) into a new header file.
* | | | | | | Implement `git_odb_object_dup`Vicent Marti2013-10-221-0/+14
| | | | | | |
* | | | | | | Allowed credential types should be a bitfieldEdward Thomson2013-10-211-10/+15
| | | | | | |
* | | | | | | checkout (from index) can write conflictsEdward Thomson2013-10-161-7/+10
|/ / / / / /
* | | | | | Merge pull request #1886 from libgit2/precompose-utf8Vicent Martí2013-10-082-5/+23
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add support for core.precomposeunicode on Mac
| * | | | | | Rename new fn to git_repository_reinit_filesystemRussell Belfer2013-10-081-2/+2
| | | | | | |
| * | | | | | Make reference lookups apply precomposeunicodeRussell Belfer2013-10-083-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before these changes, looking up a reference would return the same precomposed or decomposed form of the reference name that was used to look it up, so on MacOS which ignores the difference between the two, a single reference could be looked up either way and git_reference_name would return the form of the name that was used to look it up! This change makes lookup always return the precomposed name if core.precomposeunicode is set regardless of which version was used to look it up. The reference iterator was already returning the precomposed form from earlier work. This also updates the CMakeLists.txt rules for enabling iconv usage because the clar tests for this code were actually not being activated properly with the old version. Finally, this moves git_repository_reset_filesystem from include/ git2/repository.h to include/git2/sys/repository.h since it is not really a function that normal library users should have to think about very often.
| * | | | | | More filemode cleanups for FAT on MacOSRussell Belfer2013-10-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleans up some additional issues. The main change is that on a filesystem that doesn't support mode bits, libgit2 will now create new blobs with GIT_FILEMODE_BLOB always instead of being at the mercy to the filesystem driver to report executable or not. This means that if "core.filemode" lies and claims that filemode is not supported, then we will ignore the executable bit from the filesystem. Previously we would have allowed it. This adds an option to the new git_repository_reset_filesystem to recurse through submodules if desired. There may be other types of APIs that would like a "recurse submodules" option, but this one is particularly useful. This also has a number of cleanups, etc., for related things including trying to give better error messages when problems come up from the filesystem. For example, the FAT filesystem driver on MacOS appears to return errno EINVAL if you attempt to write a filename with invalid UTF-8 in it. We try to capture that with a better error message now.
| * | | | | | Add git_repository_reset_filesystem and fix testsRussell Belfer2013-10-041-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a repository is transferred from one file system to another, many of the config settings that represent the properties of the file system may be wrong. This adds a new public API that will refresh the config settings of the repository to account for the change of file system. This doesn't do a full "reinitialize" and operates on a existing git_repository object refreshing the config when done. This commit then makes use of the new API in clar as each test repository is set up. This commit also has a number of other clar test fixes where we were making assumptions about the type of filesystem, either based on outdated config data or based on the OS instead of the FS.
* | | | | | | tree: allow retrieval of raw attributesCarlos Martín Nieto2013-10-081-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a tool needs to recreate the tree object (for example an interface to another VCS), it needs to use the raw attributes, forgoing any normalization.
* | | | | | | index: Enhance documentationnulltoken2013-10-041-0/+3
|/ / / / / /
* | | | | | Merge pull request #1888 from jamill/network_cancellationVicent Martí2013-10-032-2/+2
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | network cancellation improvements
| * | | | | Support cancellation in push operationJameson Miller2013-10-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds cancellation for the push operation. This work consists of: 1) Support cancellation during push operation - During object counting phase - During network transfer phase - Propagate GIT_EUSER error code out to caller 2) Improve cancellation support during fetch - Handle cancellation request during network transfer phase - Clear error string when cancelled during indexing 3) Fix error handling in git_smart__download_pack Cancellation during push is still only handled in the pack building and network transfer stages of push (and not during packbuilding).
* | | | | | commit: Introduce git_commit_message_raw()nulltoken2013-10-031-0/+11
|/ / / / /
* | | | | clone: put the callbacks struct directly in the clone optionsCarlos Martín Nieto2013-10-022-3/+3
| | | | | | | | | | | | | | | | | | | | There's no need for this to be a pointer to somewhere else.
* | | | | remote: add some comments to the callback structCarlos Martín Nieto2013-10-021-1/+33
| | | | | | | | | | | | | | | | | | | | Hopefully clear up what they're for.
* | | | | clone: mention clone_into in the clone documentationCarlos Martín Nieto2013-10-021-2/+5
| | | | | | | | | | | | | | | | | | | | Make the difference more explicit.
* | | | | clone: re-allow using a custom remote nameCarlos Martín Nieto2013-10-021-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | | This is a small thing that by itself doesn't quite justify making the user use clone_into.
* | | | | clone: const-ify checkout optionsCarlos Martín Nieto2013-10-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The removal of many options which lead to the direct usage of the user's checkout options means we should make sure they remain const.
* | | | | clone: re-add a way to ignore certificate errorsCarlos Martín Nieto2013-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This used to be done via transport flags, which was removed in a previous commit.
* | | | | clone: remove more options from basic cloneCarlos Martín Nieto2013-10-021-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The basic clone function is there to make it easy to create a "normal" clone. Remove a bunch of options that are about changing the remote's configuration.
* | | | | clone: remove the autotag optionCarlos Martín Nieto2013-10-021-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Downloading all tags is part of what makes it a clone instead of simply a fetch.
* | | | | remote: add a convenience 'fetch' function.Carlos Martín Nieto2013-10-021-0/+11
| | | | |
* | | | | clone: implement git_clone_intoCarlos Martín Nieto2013-10-021-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | This allows you to set up the repository and remote as you which to have them before performing the clone operation.
* | | | | remote: move the credentials callback to the structCarlos Martín Nieto2013-10-022-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Move this one as well, letting us have a single way of setting the callbacks for the remote, and removing fields from the clone options.
* | | | | remote: put the _download() callback with the othersCarlos Martín Nieto2013-10-022-11/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | The text progress and update_tips callbacks are already part of the struct, which was meant to unify the callback setup, but the download one was left out.
* | | | Add git_transport_register, git_transport_unregisterPhilip Kelley2013-10-011-0/+34
| | | |
* | | | Initial Implementation of progress reports during pushJameson Miller2013-09-302-0/+59
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the basics of progress reporting during push. While progress for all aspects of a push operation are not reported with this change, it lays the foundation to add these later. Push progress reporting can be improved in the future - and consumers of the API should just get more accurate information at that point. The main areas where this is lacking are: 1) packbuilding progress: does not report progress during deltafication, as this involves coordinating progress from multiple threads. 2) network progress: reports progress as objects and bytes are going to be written to the subtransport (instead of as client gets confirmation that they have been received by the server) and leaves out some of the bytes that are transfered as part of the push protocol. Basically, this reports the pack bytes that are written to the subtransport. It does not report the bytes sent on the wire that are received by the server. This should be a good estimate of progress (and an improvement over no progress).
* | | That's the refdb, it's not the odb...Edward Thomson2013-09-251-2/+2
| | |
* | | Merge pull request #1865 from arrbee/various-cleanupsVicent Martí2013-09-241-4/+4
|\ \ \ | | | | | | | | Various warning cleanup and minor fixes
| * | | Clean up newly introduced warningsRussell Belfer2013-09-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attempt to "clean up warnings" seems to have introduced some new warnings on compliant compilers. This fixes those in a way that I suspect will also be okay for the non-compliant compilers. Also this fixes what appears to be an extra semicolon in the repo initialization template dir handling (and as part of that fix, handles the case where an error occurs correctly).
* | | | 'del' instead of 'delete' for the poor C++ usersEdward Thomson2013-09-241-1/+1
|/ / /
* | | Merge pull request #1863 from linquize/typoVicent Martí2013-09-221-1/+1
|\ \ \ | | | | | | | | Fix typo in documentation
| * | | Fix typo in documentationLinquize2013-09-221-1/+1
| | | |
* | | | merge: reverse array and length parameter orderCarlos Martín Nieto2013-09-221-3/+3
|/ / / | | | | | | | | | Make it pair up with the one for commits. This fixes #1691.
* | | Merge pull request #1840 from linquize/warningVicent Martí2013-09-211-1/+1
|\ \ \ | | | | | | | | Fix warning
| * | | Fix warningLinquize2013-09-191-1/+1
| | | |
* | | | Merge pull request #1858 from linquize/win32-template-dirVicent Martí2013-09-171-1/+15
|\ \ \ \ | | | | | | | | | | Configurable template dir for Win32
| * | | | Can git_libgit2_opts() with GIT_OPT_GET_TEMPLATE_PATH and ↵Linquize2013-09-181-1/+15
| | | | | | | | | | | | | | | | | | | | GIT_OPT_SET_TEMPLATE_PATH
* | | | | Bug fixes and cleanupsRussell Belfer2013-09-171-33/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This contains a few bug fixes and some header and API cleanups. The main API change is that filters should now use GIT_PASSTHROUGH to indicate that they wish to skip processing a file instead of GIT_ENOTFOUND. The bug fixes include a possible out-of-range buffer access in the ident filter, a filter ordering problem I introduced into the custom filter tests on Windows, and a filter buf NUL termination issue that was coming up on Linux.
* | | | | More filtering tests including orderRussell Belfer2013-09-171-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds more tests of filters, including the ident filter when mixed with custom filters. I was able to combine with the reverse filter and demonstrate that the order of filter application with the default priority constants matches the order of core Git. Also, this fixes two issues in the ident filter: preventing ident expansion on binary files and avoiding a NULL dereference when dollar sign characters are found without Id.
* | | | | Port tests from PR 1683Russell Belfer2013-09-172-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports over some of the tests from https://github.com/libgit2/libgit2/pull/1683 by @yorah and @ethomson
* | | | | Merge git_buf and git_bufferRussell Belfer2013-09-174-68/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Add ident filterRussell Belfer2013-09-172-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ident filter (that knows how to replace $Id$) and tweaks the filter APIs and code so that git_filter_source objects actually have the updated OID of the object being filtered when it is a known value.
* | | | | Add functions to manipulate filter listsRussell Belfer2013-09-172-17/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the git2/sys/filter API with functions to look up a filter and add it manually to a filter list. This requires some trickery because the regular attribute lookups and checks are bypassed when this happens, but in the right hands, it will allow a user to have granular control over applying filters.
* | | | | Hook up filter initialize callbackRussell Belfer2013-09-171-0/+2
| | | | | | | | | | | | | | | | | | | | I knew I forgot something
* | | | | Extend public filter api with filter listsRussell Belfer2013-09-173-22/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the git_filter_list into the public API so that users can create, apply, and dispose of filter lists. This allows more granular application of filters to user data outside of libgit2 internals. This also converts all the internal usage of filters to the public APIs along with a few small tweaks to make it easier to use the public git_buffer stuff alongside the internal git_buf.
* | | | | Add attributes to filters and fix registryRussell Belfer2013-09-172-18/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The filter registry as implemented was too primitive to actually work once multiple filters were coming into play. This expands the implementation of the registry to handle multiple prioritized filters correctly. Additionally, this adds an "attributes" field to a filter that makes it really really easy to implement filters that are based on one or more attribute values. The lookup and even simple value checking can all happen automatically without custom filter code. Lastly, with the registry improvements, this fills out the filter lifecycle callbacks, with initialize and shutdown callbacks that will be called before the filter is first used and after it is last invoked. This allows for system-wide initialization and cleanup by the filter.
* | | | | Make git_filter_source opaqueRussell Belfer2013-09-171-6/+23
| | | | |