include


Log

Author Commit Date CI Message
Arthur Schreiber 991b2840 2014-01-26T19:35:02 Make sure git_remote_dup copies a remote's refspecs correctly.
Arthur Schreiber 11f6ad5f 2014-01-15T21:15:34 Add some missing const declarations.
Nicolas Hake c05cd792 2014-01-22T17:51:32 Drop git_patch_to_str It's hard or even impossible to correctly free the string buffer allocated by git_patch_to_str in some circumstances. Drop the function so people have to use git_patch_to_buf instead - git_buf has a dedicated destructor.
Nicolas Hake 450e8e9e 2014-01-22T13:22:15 Expose patch serialization to git_buf Returning library-allocated strings from libgit2 works fine on Linux, but may cause problems on Windows because there is no one C Runtime that everything links against. With libgit2 not exposing its own allocator, freeing the string is a gamble. git_patch_to_str already serializes to a buffer, then returns the underlying memory. Expose the functionality directly, so callers can use the git_buf_free function to free the memory later.
Edward Thomson db3462ce 2014-01-19T22:36:50 Support union merges
Edward Thomson 0e1ba46c 2014-01-19T20:03:13 Remove the "merge none" flag The "merge none" (don't automerge) flag was only to aide in merge trivial tests. We can easily determine whether merge trivial resulted in a trivial merge or an automerge by examining the REUC after automerge has completed.
Edward Thomson e651e8e2 2014-01-19T15:05:08 Introduce diff3 mode for checking out conflicts
Edward Thomson c1d648c5 2014-01-08T18:29:42 merge_file should use more aggressive levels The default merge_file level was XDL_MERGE_MINIMAL, which will produce conflicts where there should not be in the case where both sides were changed identically. Change the defaults to be more aggressive (XDL_MERGE_ZEALOUS) which will more aggressively compress non-conflicts. This matches git.git's defaults. Increase testing around reverting a previously reverted commit to illustrate this problem.
Edward Thomson b554ca5d 2014-01-20T15:12:06 "Uninitialized" submodules are "unmodified" Extend the "unmodified" submodule workdir test to include uninitialized submodules, to prevent reporting submodules as modified when they're not in the workdir at all.
Arthur Schreiber 3f033c55 2014-01-16T21:53:25 Revert a wrong doc change.
Arthur Schreiber 3f0e3e16 2014-01-16T21:42:28 Fix some documentation issues.
Carlos Martín Nieto 0b28217b 2014-01-15T12:51:31 refs: remove the _with_log differentiation Any well-behaved program should write a descriptive message to the reflog whenever it updates a reference. Let's make this more prominent by removing the version without the reflog parameters.
Arthur Schreiber 529f342a 2014-01-14T21:33:59 Align git_tree_entry_dup.
Arthur Schreiber 29be3a6d 2014-01-14T21:33:35 Align git_signature_dup. This changes git_signature_dup to actually honor oom conditions raised by the call to git__strdup. It also aligns it with the error code return pattern used everywhere else.
Arthur Schreiber 40ef47dd 2014-01-14T21:03:01 Add `git_remote_dup`.
Edward Thomson 6adcaab7 2014-01-08T10:07:30 Handle git_buf's from users more liberally
John Crepezzi e7f89b46 2014-01-04T18:18:59 Fix spelling mistake Closes #2029
Russell Belfer ac9f9231 2014-01-03T14:40:25 Merge pull request #2022 from KTXSoftware/development submodule branch option + little VS2013 fix
Russell Belfer 91524172 2014-01-02T14:30:24 Fix warnings with submodule changes
Robert Konrad 10311979 2014-01-02T03:14:03 Read the submodule branch option from Git 1.8.2.
Linquize fccadba2 2013-12-29T10:26:21 Accept 'submodule.*.fetchRecurseSubmodules' config 'on-demand' value
Vicent Marti 4e1f517c 2013-12-18T09:33:45 Merge pull request #1920 from libgit2/cmn/ref-with-log Reference operations with log
Edward Thomson 81a2012d 2013-12-12T11:30:50 Overwrite ignored files on checkout
Russell Belfer 452c7de6 2013-12-12T14:16:40 Add git_treebuilder_insert test and clarify doc 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.
Russell Belfer 9cfce273 2013-12-12T12:11:38 Cleanups, renames, and leak fixes 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.
Russell Belfer 7697e541 2013-12-11T15:02:20 Test cancel from indexer progress callback 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.
Russell Belfer 8f1066a0 2013-12-10T16:02:24 Update clone doc and tests for callback return val 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.
Russell Belfer cbd04896 2013-12-10T14:38:35 Fix checkout notify callback docs and tests 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.
Russell Belfer 19853bdd 2013-12-10T13:01:34 Update git_blob_create_fromchunks callback behavr 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.
Russell Belfer 373cf6a9 2013-12-09T10:17:47 Update docs for new callback return value behavior
Russell Belfer 25e0b157 2013-12-06T15:07:57 Remove converting user error to GIT_EUSER 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.
Russell Belfer 96869a4e 2013-12-03T16:45:39 Improve GIT_EUSER handling 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.
Russell Belfer 9f77b3f6 2013-11-25T14:21:34 Add config read fns with controlled error behavior 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.
Carlos Martín Nieto f2105129 2013-11-23T14:39:53 refs: expose has_log() on the backend 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.
Carlos Martín Nieto 8d5ec910 2013-11-23T14:13:01 refs: expose a way to ensure a ref has a log 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.
Ben Straub a7c83aec 2013-12-06T13:39:08 Clarify docs
Ben Straub 710f3838 2013-12-06T09:32:09 Clarify default value and behavior
Ben Straub a6ebc2bd 2013-12-04T15:17:39 Introduce GIT_DIFF_FIND_BY_CONFIG
Edward Thomson eac938d9 2013-12-02T14:10:04 Bare naked merge and rebase
Linquize d706e843 2013-12-03T23:00:50 Include git2/revert.h in git2.h
Vicent Martí db0a7e39 2013-12-03T02:11:55 Merge pull request #1977 from ethomson/revert Revert support for a single commit
Edward Thomson bab0b9f2 2013-11-22T18:02:12 clean up state metadata more consistently
Edward Thomson 300d192f 2013-12-02T11:15:27 Introduce git_revert to revert a single commit
Russell Belfer f62c174d 2013-12-02T13:49:58 GIT_DIFF_FIND_REMOVE_UNMODIFIED sounds better
Russell Belfer 97ad85b8 2013-12-02T13:30:05 Add GIT_DIFF_FIND_DELETE_UNMODIFIED flag 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.
Carlos Martín Nieto 13c9e44a 2013-11-14T19:41:09 reflog: remove git_reflog_append_to() 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.
Carlos Martín Nieto a57dd3b7 2013-11-13T18:15:20 reflog: integrate into the ref writing 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.
Carlos Martín Nieto 110df893 2013-11-13T13:36:37 refdb: add a `message` parameter for appending to the log This is as yet unused.
nulltoken ca84e058 2013-05-14T16:40:09 refs: Introduce git_reference_symbolic_set_target_with_log()
nulltoken 14ab0e10 2013-05-14T16:07:33 refs: Introduce git_reference_set_target_with_log()
nulltoken 56ad3782 2013-05-13T17:44:39 refs: Introduce git_reference_symbolic_create_with_log()
nulltoken bba25f39 2013-05-13T16:21:09 refs: Introduce git_reference_create_with_log()
Alessandro Ghedini 138e014c 2013-11-20T14:20:32 transport: document ssh-agent authentication
Vicent Marti 43cb8b32 2013-11-20T12:53:33 libgit2 0.20.0 "anmeldung" 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
Carlos Martín Nieto 1b3fe73c 2013-11-20T11:52:57 Formatting fix for cred_acquire_cb
Nick Hengeveld d8e7ffc2 2013-11-18T14:03:25 Add content offset to git_diff_line For additions and deletions, external consumers like subversion can make use of the content offset to generate diffs in their proprietary formats.
Edward Thomson 84efffc3 2013-11-13T16:57:51 Introduce git_cred_default for NTLM/SPNEGO auth
Ben Straub 83e1efbf 2013-11-14T14:10:32 Update files that reference tests-clar
Vicent Martí 7b947bf5 2013-11-14T07:21:47 Merge pull request #1951 from victorgp/create-remote-plus-fetch Allowing create remotes with custom fetch spec
Vicent Martí 6414fd33 2013-11-11T06:47:15 Merge pull request #1956 from libgit2/cmn/fetch-default-head Remote revamp (director's cut)
Carlos Martín Nieto 359dce72 2013-11-02T00:05:32 remote: make _ls return the list directly 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.
Carlos Martín Nieto 266af6d8 2013-10-30T13:44:22 remote: don't allow such direct access to the refspecs 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.
Victor Garcia 886cc447 2013-11-08T15:42:52 fixing typo
Victor Garcia 40b99d05 2013-11-08T12:14:31 splitting funcionality in two methods to avoid ambiguity with NULL
Edward Thomson 1e60e5f4 2013-11-07T12:03:44 Allow callers to set mode on packfile creation
Victor Garcia 99feb988 2013-11-07T16:22:49 adding doc for new param and test to check fetch spec is correctly added
Edward Thomson cc2447da 2013-11-06T18:41:08 Add git_packbuilder_hash to query pack filename
Victor Garcia 0fe522d1 2013-11-07T14:16:20 allowing create remote with custom fetch spec
Carlos Martín Nieto a8baf4b1 2013-11-05T12:26:41 Merge pull request #1946 from arthurschreiber/change-branch-iterator-definition Change the git_branch_iterator_new definition to use git_branch_t
Arthur Schreiber a667ca82 2013-11-05T20:51:07 Change the git_branch_iterator_new and git_branch_next definitions to use git_branch_t.
Ben Straub 8adea28a 2013-11-05T11:42:42 Blame: change signature to be more binding-friendly
Edward Thomson 039db728 2013-07-03T01:00:45 merge branch into current, updating workdir
Vicent Martí c82f7f8e 2013-11-05T06:55:16 Merge pull request #1938 from libgit2/cmn/branch-iterator branch: move from foreach to an iterator
Vicent Martí ffd04053 2013-11-05T06:05:32 Merge pull request #1941 from libgit2/rb/preserve-iterator-error Preserve error messages during file system iterator cleanup
Carlos Martín Nieto 8ec889a4 2013-11-02T14:07:02 branch: move from foreach to an iterator Create a git_branch_iterator type which is equivalent to the foreach but lets us write loops instead of callbacks. Since the introduction of git_reference_shorthand(), the added value of passing the name is reduced.
Vicent Marti 1eab9f0e 2013-11-05T14:56:10 error: Simplify giterr_detach
Edward Thomson f966acd1 2013-11-04T15:46:32 Take umask into account in filebuf_commit
Russell Belfer d6c60169 2013-11-04T15:45:31 Add giterr_detach API to get and clear error There are a number of cases where it is convenient to be able to fetch and "claim" the current error string, clearing the error. This is helpful when you need to call some code that may alter the error and you want to restore it later on and/or report it via some other mechanism.
Vicent Martí 0e1115d2 2013-11-04T12:16:14 Merge pull request #1939 from ethomson/readwrite_odb Allow backend consumers to specify file mode
Edward Thomson dd64c71c 2013-11-04T14:50:25 Allow backend consumers to specify file mode
Russell Belfer fb6b0e01 2013-11-04T10:44:59 Merge pull request #1317 from libgit2/blame Blame Canada
Vicent Martí 44acdd1f 2013-11-04T08:09:58 Merge pull request #1937 from scunz/checkout_assert Don't assert in git_checkout_tree
Sascha Cunz 35221441 2013-11-02T03:43:34 Checkout: Don't assert if treeish is NULL In git_checkout_tree, the first check tests if either repo or treeish is NULL and says that eithor of them has to have a valid value. But there is no code to handle the treeish == NULL case. So, do something meaningful in that case: use HEAD instead.
Sascha Cunz 10749f6c 2013-11-02T03:20:05 Checkout: Unifiy const-ness of `opts` parameter Since all 3 checkout APIs perform the same operation with the options, all of them should use the same const-ness.
Carlos Martín Nieto 2f03050f 2013-10-26T16:21:31 remote: download HEAD when no refspecs are given 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.
Russell Belfer a5c16f3c 2013-11-01T10:18:03 Add git_diff_options_init helper Sometimes the static initializer for git_diff_options cannot be used and since setting them to all zeroes doesn't actually work quite right, this adds a new helper for that situation. This also adds an explicit new value to the submodule settings options to be used when those enums need static initialization.
Russell Belfer 8e5a8ef8 2013-11-01T09:51:01 Convert git_index_read to have a "force" flag This is a little more intuitive than the turned-around option that I originally wrote.
Russell Belfer 4bf630b6 2013-10-31T14:36:52 Make diff and status perform soft index reload This changes `git_index_read` to have two modes - a hard index reload that always resets the index to match the on-disk data (which was the old behavior) and a soft index reload that uses the timestamp / file size information and only replaces the index data if the file on disk has been modified. This then updates the git_status code to do a soft reload unless the new GIT_STATUS_OPT_NO_REFRESH flag is passed in. This also changes the behavior of the git_diff functions that use the index so that when an index is not explicitly passed in (i.e. when the functions call git_repository_index for you), they will also do a soft reload for you. This intentionally breaks the file signature of git_index_read because there has been some confusion about the behavior previously and it seems like all existing uses of the API should probably be examined to select the desired behavior.
Vicent Martí ac5e507c 2013-11-01T09:31:52 Merge pull request #1918 from libgit2/cmn/indexer-naming indexer: remove the stream infix
Daniel Rodríguez Troitiño 3793fa9b 2013-10-31T01:08:50 Fix saving remotes with several fetch/push ref specs. At some moment git_config_delete_entry lost the ability to delete one entry of a multivar configuration. The moment you had more than one fetch or push ref spec for a remote you will not be able to save that remote anymore. The changes in network::remote::remotes::save show that problem. I needed to create a new git_config_delete_multivar because I was not able to remove one or several entries of a multivar config with the current API. Several tries modifying how git_config_set_multivar(..., NULL) behaved were not successful. git_config_delete_multivar is very similar to git_config_set_multivar, and delegates into config_delete_multivar of config_file. This function search for the cvar_t that will be deleted, storing them in a temporal array, and rebuilding the linked list. After calling config_write to delete the entries, the cvar_t stored in the temporal array are freed. There is a little fix in config_write, it avoids an infinite loop when using a regular expression (case for the multivars). This error was found by the test network::remote::remotes::tagopt.
Carlos Martín Nieto 97d32abb 2013-10-30T15:09:32 Remove leftover function declaration
Carlos Martín Nieto a6154f21 2013-10-30T15:00:05 indexer: remove the stream infix It was there to keep it apart from the one which read in from a file on disk. This other indexer does not exist anymore, so there is no need for anything other than git_indexer to refer to it. While here, rename _add() function to _append() and _finalize() to _commit(). The former change is cosmetic, while the latter avoids talking about "finalizing", which OO languages use to mean something completely different.
Ben Straub 42c8f8f8 2013-10-28T11:04:58 Merge remote-tracking branch 'libgit2/development' into blame
Vicent Martí 5c50f22a 2013-10-28T09:25:44 Merge pull request #1891 from libgit2/cmn/fix-thin-packs Add support for thin packs
Vicent Martí 5565f3cd 2013-10-28T07:04:58 Merge pull request #1904 from libgit2/cmn/ssh-naming Rename the ssh credentials
Ben Straub 8f4a8b09 2013-10-28T06:20:28 Merge pull request #1802 from libgit2/cmn/reflog-backend Make reflog part of refdb
Carlos Martín Nieto 5cb13670 2013-10-23T15:45:29 transport: let the progress output return an error There are any number of issues that can come up in the progress callback, and we should let the user cancel at that point as well.
Carlos Martín Nieto ab46b1d8 2013-10-23T15:08:18 indexer: include the delta stats The user is unable to derive the number of deltas in the pack, as that would require them to capture the stats exactly in the moment between download and final processing, which is abstracted away in the fetch. Capture these numbers for the user and expose them in the progress struct. The clone and fetch examples now also present this information to the user.
Carlos Martín Nieto 70a8c78f 2013-10-23T12:08:54 Rename the ssh credentials The names from libssh2 are somewhat obtuse for us. We can simplify the usual key/passphrase credential's name, as well as make clearer what the custom signature function is.
Vicent Martí 1c74686e 2013-10-22T11:55:54 Merge pull request #1897 from libgit2/split-patch-from-diff RFC: Proposed reworking of diff APIs