Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-11-09push: use the common refspec parserCarlos Martín Nieto
There is one well-known and well-tested parser which we should use, instead of implementing parsing a second time. The common parser is also augmented to copy the LHS into the RHS if the latter is empty. The expressions test had to change a bit, as we now catch a bad RHS of a refspec locally.
2014-05-02Make init_options fns use unsigned ints and macroRussell Belfer
Use an unsigned int for the version and add a helper macro so the code is simplified (and so the error message is a common string).
2014-04-21Fire update_tips callback also for pushes.Jacques Germishuys
2014-04-21It is safe to free() a NULL pointerJacques Germishuys
2014-04-03Const correctness!Jacques Germishuys
2014-03-06Added function-based initializers for every options struct.Matthew Bowen
The basic structure of each function is courtesy of arrbee.
2014-02-05Add reflog parameters to git_push_update_tipsBen Straub
2014-01-27refspec: move to git_buf for outputting stringsCarlos Martín Nieto
2014-01-15refs: remove the _with_log differentiationCarlos Martín Nieto
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.
2013-12-13Cleanups, renames, and leak fixesRussell Belfer
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.
2013-12-11One more rename/cleanup for callback err functionsRussell Belfer
2013-12-11Some callback error check style cleanupsRussell Belfer
I find this easier to read...
2013-12-11Remove converting user error to GIT_EUSERRussell Belfer
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.
2013-12-11Add git_vector_free_allRussell Belfer
There are a lot of places that we call git__free on each item in a vector and then call git_vector_free on the vector itself. This just wraps that up into one convenient helper function.
2013-12-11Further EUSER and error propagation fixesRussell Belfer
This continues auditing all the places where GIT_EUSER is being returned and making sure to clear any existing error using the new giterr_user_cancel helper. As a result, places that relied on intercepting GIT_EUSER but having the old error preserved also needed to be cleaned up to correctly stash and then retrieve the actual error. Additionally, as I encountered places where error codes were not being propagated correctly, I tried to fix them up. A number of those fixes are included in the this commit as well.
2013-11-13Fix warningsRussell Belfer
2013-11-12Fix warningsLinquize
2013-11-11remote: make _ls return the list directlyCarlos Martín Nieto
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.
2013-10-02Support cancellation in push operationJameson Miller
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).
2013-09-30Initial Implementation of progress reports during pushJameson Miller
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).
2013-08-16push: handle tag chains correctlyCarlos Martín Nieto
When dealing with a chain of tags, we need to enqueue each of them individually, which means we can't use `git_tag_peel` as that jumps over the intermediate tags. Do the peeling manually so we can look at each object and take the appropriate action.
2013-05-11Fix broken build when MSVC SDL checks is enabledLinquize
2013-05-02Report some errors returnable by pushRussell Belfer
2013-04-30Make git_oid_cmp public and add git_oid__cmpRussell Belfer
2013-04-20remote: handle multiple refspecsCarlos Martín Nieto
A remote can have a multitude of refspecs. Up to now our git_remote's have supported a single one for each fetch and push out of simplicity to get something working. Let the remotes and internal code know about multiple remotes and get the tests passing with them. Instead of setting a refspec, the external users can clear all and add refspecs. This should be enough for most uses, though we're still missing a querying function.
2013-04-16Merge remote-tracking branch 'ben/unified-revparse' into developmentVicent Marti
2013-04-15Redeploy git_revparse_single.Ben Straub
2013-04-09Deprecate git_revparse_single and _rangelikeBen Straub
2013-03-19Fix dumb mistake in the comparison functionPhilip Kelley
2013-03-19Convert enqueue_object to a functionPhilip Kelley
2013-03-19Reduce the number of unnecessary objects in pushed packsPhilip Kelley
2013-03-12Implemented push on the local transportabepern
2013-02-11Add git_push_options, to set packbuilder parallelismPhilip Kelley
2013-02-09Merge the push report into the refs to avoid a 3rd network callPhilip Kelley
2013-01-22Update remote tips on pushJameson Miller
2013-01-17Don't segfault if transport doesn't support push.Sebastian Bauer
Instead, set an more informative error message.
2013-01-09push: properly handle tagsMichael Schubert
Currently, push doesn't really handle tags when queueing objects. Fix it.
2013-01-09Relax refspecs accepted by pushJameson Miller
2013-01-09update copyrightsEdward Thomson
2013-01-04Fix bug in gen_pktline() for deletes of missing remote refsCongyi Wu
* gen_pktline() in smart_protocol.c was skipping refspecs that deleted refs that were not advertised by the server. The new behavior is to send a delete command with an old-id of zero, which matches the behavior of the official git client. * Update test_network_push__delete() in reaction to above fix. * Obviate messy logic that handles missing push_spec rrefs by canonicalizing push_spec. After calculate_work(), loid, roid, and rref, are filled in with exactly what is sent to the server
2012-11-28Push! By schu, phkelley, and congyiwu, et alPhilip Kelley