summaryrefslogtreecommitdiff
path: root/include/git2
Commit message (Collapse)AuthorAgeFilesLines
...
* | Accept 'submodule.*.fetchRecurseSubmodules' config 'on-demand' valueLinquize2013-12-311-2/+15
| |
* | Merge pull request #1920 from libgit2/cmn/ref-with-logVicent Marti2013-12-183-23/+164
|\ \ | | | | | | Reference operations with log
| * | refs: expose has_log() on the backendCarlos Martín Nieto2013-12-092-3/+8
| | | | | | | | | | | | | | | | | | The frontend used to look at the file directly, but that's obviously not the right thing to do. Expose it on the backend and use that function instead.
| * | refs: expose a way to ensure a ref has a logCarlos Martín Nieto2013-12-092-0/+18
| | | | | | | | | | | | | | | | | | Sometimes (e.g. stash) we want to make sure that a log will be written, even if it's not in one of the standard locations. Let's make that easier.
| * | reflog: remove git_reflog_append_to()Carlos Martín Nieto2013-11-231-18/+1
| | | | | | | | | | | | | | | | | | This was a convenience method for the refs front-end to do the reflog writing. This is now done in the backend and it has no more reason for being.
| * | reflog: integrate into the ref writingCarlos Martín Nieto2013-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever a reference is created or updated, we need to write to the reflog regardless of whether the user gave us a message, so we shouldn't leave that to the ref frontend, but integrate it into the backend. This also eliminates the race between ref update and writing to the reflog, as we protect the reflog with the ref lock. As an additional benefit, this reflog append on the backend happens by appending to the file instead of parsing and rewriting it.
| * | refdb: add a `message` parameter for appending to the logCarlos Martín Nieto2013-11-231-2/+4
| | | | | | | | | | | | This is as yet unused.
| * | refs: Introduce git_reference_symbolic_set_target_with_log()nulltoken2013-11-231-0/+25
| | |
| * | refs: Introduce git_reference_set_target_with_log()nulltoken2013-11-231-0/+23
| | |
| * | refs: Introduce git_reference_symbolic_create_with_log()nulltoken2013-11-231-0/+42
| | |
| * | refs: Introduce git_reference_create_with_log()nulltoken2013-11-231-0/+43
| | |
* | | Overwrite ignored files on checkoutEdward Thomson2013-12-131-0/+8
| | |
* | | Add git_treebuilder_insert test and clarify docRussell Belfer2013-12-121-2/+9
| | | | | | | | | | | | | | | | | | This wasn't being tested and since it has a callback, I fixed it even though the return value of this callback is not treated like any of the other callbacks in the API.
* | | Cleanups, renames, and leak fixesRussell Belfer2013-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This renames git_vector_free_all to the better git_vector_free_deep and also contains a couple of memory leak fixes based on valgrind checks. The fixes are specifically: failure to free global dir path variables when not compiled with threading on and failure to free filters from the filter registry that had not be initialized fully.
* | | Test cancel from indexer progress callbackRussell Belfer2013-12-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds tests that try canceling an indexer operation from within the progress callback. After writing the tests, I wanted to run this under valgrind and had a number of errors in that situation because mmap wasn't working. I added a CMake option to force emulation of mmap and consolidated the Amiga-specific code into that new place (so we don't actually need separate Amiga code now, just have to turn on -DNO_MMAP). Additionally, I made the indexer code propagate error codes more reliably than it used to.
* | | Update clone doc and tests for callback return valRussell Belfer2013-12-111-24/+33
| | | | | | | | | | | | | | | | | | | | | Clone callbacks can return non-zero values to cancel the clone. This adds some tests to verify that this actually works and updates the documentation to be clearer that this can happen and that the return value will be propagated back by the clone function.
* | | Fix checkout notify callback docs and testsRussell Belfer2013-12-111-8/+13
| | | | | | | | | | | | | | | | | | | | | The checkout notify callback behavior on non-zero return values was not being tested. This adds tests, fixes a bug with positive values, and clarifies the documentation to make it clear that the checkout can be canceled via this mechanism.
* | | 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.
* | | Update docs for new callback return value behaviorRussell Belfer2013-12-1113-58/+91
| | |
* | | Remove converting user error to GIT_EUSERRussell Belfer2013-12-112-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the behavior of callbacks so that the callback error code is not converted into GIT_EUSER and instead we propagate the return value through to the caller. Instead of using the giterr_capture and giterr_restore functions, we now rely on all functions to pass back the return value from a callback. To avoid having a return value with no error message, the user can call the public giterr_set_str or some such function to set an error message. There is a new helper 'giterr_set_callback' that functions can invoke after making a callback which ensures that some error message was set in case the callback did not set one. In places where the sign of the callback return value is meaningful (e.g. positive to skip, negative to abort), only the negative values are returned back to the caller, obviously, since the other values allow for continuing the loop. The hardest parts of this were in the checkout code where positive return values were overloaded as meaningful values for checkout. I fixed this by adding an output parameter to many of the internal checkout functions and removing the overload. This added some code, but it is probably a better implementation. There is some funkiness in the network code where user provided callbacks could be returning a positive or a negative value and we want to rely on that to cancel the loop. There are still a couple places where an user error might get turned into GIT_EUSER there, I think, though none exercised by the tests.
* | | Improve GIT_EUSER handlingRussell Belfer2013-12-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds giterr_user_cancel to return GIT_EUSER and clear any error message that is sitting around. As a result of using that in places, we need to be more thorough with capturing errors that happen inside a callback when used internally. To help with that, this also adds giterr_capture and giterr_restore so that when we internally use a foreach-type function that clears errors and converts them to GIT_EUSER, it is easier to restore not just the return value, but the actual error message text.
* | | Add config read fns with controlled error behaviorRussell Belfer2013-12-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds `git_config__lookup_entry` which will look up a key in a config and return either the entry or NULL if the key was not present. Optionally, it can either suppress all errors or can return them (although not finding the key is not an error for this function). Unlike other accessors, this does not normalize the config key string, so it must only be used when the key is known to be in normalized form (i.e. all lower-case before the first dot and after the last dot, with no invalid characters). This also adds three high-level helper functions to look up config values with no errors and a fallback value. The three functions are for string, bool, and int values, and will resort to the fallback value for any error that arises. They are: * `git_config__get_string_force` * `git_config__get_bool_force` * `git_config__get_int_force` None of them normalize the config `key` either, so they can only be used for internal cases where the key is known to be in normal format.
* | | Clarify docsBen Straub2013-12-061-3/+3
| | |
* | | Clarify default value and behaviorBen Straub2013-12-061-1/+5
| | |
* | | Introduce GIT_DIFF_FIND_BY_CONFIGBen Straub2013-12-051-0/+3
| |/ |/|
* | Bare naked merge and rebaseEdward Thomson2013-12-032-7/+50
| |
* | Merge pull request #1977 from ethomson/revertVicent Martí2013-12-034-3/+67
|\ \ | | | | | | Revert support for a single commit
| * | clean up state metadata more consistentlyEdward Thomson2013-12-021-3/+3
| | |
| * | Introduce git_revert to revert a single commitEdward Thomson2013-12-023-0/+64
| |/
* | GIT_DIFF_FIND_REMOVE_UNMODIFIED sounds betterRussell Belfer2013-12-021-2/+2
| |
* | Add GIT_DIFF_FIND_DELETE_UNMODIFIED flagRussell Belfer2013-12-021-14/+44
|/ | | | | | | | | | When doing copy detection, it is often necessary to include UNMODIFIED records in the git_diff so they are available as source records for GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED. Yet in the final diff, often you will not want to have these UNMODIFIED records. This adds a flag which marks these UNMODIFIED records for deletion from the diff list so they will be removed after the rename detect phase is over.
* transport: document ssh-agent authenticationAlessandro Ghedini2013-11-201-0/+12
|
* libgit2 0.20.0 "anmeldung"v0.20.0Vicent Marti2013-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apologies for the delay. This release is chunky, but you're probably used to chunky releases by now. Full changelog follows: Internal changes + Added support for decomposed Unicode paths in Mac OS X + Added support for junctions in win32 + Fixed issues with HTTP redirects in the network stack + Performance improvements (as always) git2/blame.h + added full support for blame operations git2/blob.h + added `git_blob_filtered_content` to load blobs in memory with their corresponding filters applied git2/branch.h + added branch iterators as an alternative to the callback-based API git2/buffer.h + exported the git_buf struct to allow binary buffers to be passed from/to the library. This simplifies several APIs git2/checkout.h + implemented additional checkout options ('skip unmerged', 'use ours' and 'use theirs') git2/clone.h + simplified the clone API + added new `git_clone_into` to clone into an existing (empty) repository git2/commit.h + added APIs to access the raw (uncleaned) text of a commit message git2/common.h + added global options to set the default paths to load templates from git2/config.h + added multivar iterators + added globbing iterator + added `git_config_foreach_match` to perform operations on every single var in a config file git2/diff.h + restructured and simplified the diff API git2/filter.h + added external APIs to configure and apply custom filters to checked out blobs git2/index.h + `git_index_read` can now force a reload of the index file even if it hasn't changed on-disk git2/indexer.h + improved the streaming indexer APIs git2/merge.h + added support for merge! git2/object.h + added helper API to lookup a generic object by path git2/pack.h + added progress callbacks to the packbuilder git2/patch.h + added support for patch generation as part of the Diff API revamp git2/pathspec.h + added helper APIs to work with pathspecs and match files in the workdir or diffs git2/push.h + added progress callbacks to push git2/reflog.h + changed reflog APIs to work on reference names instead of the references themselves, so they become less racy git2/remote.h + added support for setting refspecs on remotes, either at creation or on existing ones + simplified the remotes API git2/revwalk.h + add API to simplify parents during a walk git2/signature.h + add helper to create a signature with the default values for a repository (i.e. the set `user.name` and `user.email` values, and the current time) git2/submodules.h + improve the status detection for submodules git2/sys/ + exported many new internal APIs, such as pluggabe transport APIs -vmg, out
* Formatting fix for cred_acquire_cbCarlos Martín Nieto2013-11-201-6/+6
|
* Add content offset to git_diff_lineNick Hengeveld2013-11-181-0/+1
| | | | | | For additions and deletions, external consumers like subversion can make use of the content offset to generate diffs in their proprietary formats.
* Introduce git_cred_default for NTLM/SPNEGO authEdward Thomson2013-11-181-3/+17
|
* Update files that reference tests-clarBen Straub2013-11-141-1/+1
|
* Merge pull request #1951 from victorgp/create-remote-plus-fetchVicent Martí2013-11-141-0/+19
|\ | | | | Allowing create remotes with custom fetch spec
| * fixing typoVictor Garcia2013-11-081-1/+1
| |
| * splitting funcionality in two methods to avoid ambiguity with NULLVictor Garcia2013-11-081-1/+17
| |
| * adding doc for new param and test to check fetch spec is correctly addedVictor Garcia2013-11-071-1/+3
| |
| * allowing create remote with custom fetch specVictor Garcia2013-11-071-1/+2
| |
* | Merge pull request #1956 from libgit2/cmn/fetch-default-headVicent Martí2013-11-112-23/+41
|\ \ | | | | | | Remote revamp (director's cut)
| * | remote: make _ls return the list directlyCarlos Martín Nieto2013-11-112-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The callback-based method of listing remote references dates back to the beginning of the network code's lifetime, when we didn't know any better. We need to keep the list around for update_tips() after disconnect() so let's make use of this to simply give the user a pointer to the array so they can write straightforward code instead of having to go through a callback.
| * | remote: don't allow such direct access to the refspecsCarlos Martín Nieto2013-11-101-10/+27
| | | | | | | | | | | | | | | | | | Removing arbitrary refspecs makes things more complex to reason about. Instead, let the user set the fetch and push refspec list to whatever they want it to be.
| * | remote: download HEAD when no refspecs are givenCarlos Martín Nieto2013-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | The correct behaviour when a remote has no refspecs (e.g. a URL from the command-line) is to download the remote's HEAD. Let's do that. This fixes #1261.
* | | Allow callers to set mode on packfile creationEdward Thomson2013-11-072-0/+4
| | |
* | | Add git_packbuilder_hash to query pack filenameEdward Thomson2013-11-071-0/+10
| |/ |/|
* | Merge pull request #1946 from arthurschreiber/change-branch-iterator-definitionCarlos Martín Nieto2013-11-051-2/+2
|\ \ | | | | | | Change the git_branch_iterator_new definition to use git_branch_t
| * | Change the git_branch_iterator_new and git_branch_next definitions to use ↵Arthur Schreiber2013-11-051-2/+2
| | | | | | | | | | | | git_branch_t.