summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Don't use cl_git_pass for POSIX functionsrb/minor-cleanupsRussell Belfer2014-10-102-3/+3
| | | | | | | If there is a failure then cl_git_pass tries to get the libgit2 error, but p_... functions don't set that. Also - trailing whitespace cleanup.
* Move un-namespaced constant to internal headerRussell Belfer2014-10-102-2/+2
| | | | FLAG_BITS only seems to be used internally
* Merge pull request #2470 from libgit2/cmn/read-tree-cacheEdward Thomson2014-10-108-47/+457
|\ | | | | Fill the tree cache when reading in a tree into an index
| * Update CHANGELOG and PROJECTS with the tree cache changesCarlos Martín Nieto2014-10-102-2/+3
| |
| * index: fill the tree cache on write-treeCarlos Martín Nieto2014-10-101-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An obvious place to fill the tree cache is on write-tree, as we're guaranteed to be able to fill in the whole tree cache. The way this commit does this is not the most efficient, as we read the root tree from the odb instead of filling in the cache as we go along, but it fills the cache such that successive operations (and persisting the index to disk) will be able to take advantage of the cache, and it reuses the code we already have for filling the cache. Filling in the cache as we create the trees would require some reallocation of the children vector, which is currently not possible with out pool implementation. A different data structure would likely allow us to perform this operation at a later date.
| * index: make sure to write cached subtrees if parent is invalidatedCarlos Martín Nieto2014-10-102-4/+55
| | | | | | | | | | If e.g. the root tree is invalidated, we still want to write out its children, since those may still have valid cache entries.
| * index: write out the tree cache extensionCarlos Martín Nieto2014-10-105-19/+168
| | | | | | | | | | | | | | | | | | | | Keeping the cache around after read-tree is only one part of the optimisation opportunities. In order to share the cache between program instances, we need to write the TREE extension to the index. Do so, taking the opportunity to rename 'entries' to 'entry_count' to match the name given in the format description. The included test is rather trivial, but works as a sanity check.
| * tree-cache: remove the parent pointerCarlos Martín Nieto2014-10-102-11/+9
| | | | | | | | | | This wasn't used. We invalidate based on the full path, so we always go down the tree, never up.
| * index: add tests for the tree cacheCarlos Martín Nieto2014-10-101-0/+110
| | | | | | | | | | These test that we invalidate at the right levels and that we remove the tree cache when clearing the index.
| * index: fill the tree cache when reading from a treeCarlos Martín Nieto2014-10-103-0/+83
| | | | | | | | | | | | When reading from a tree, we know what every tree is going to look like, so we can fill in the tree cache completely, making use of the index for modification of trees a lot quicker.
| * tree-cache: move to use a pool allocatorCarlos Martín Nieto2014-10-104-30/+22
| | | | | | | | | | | | This simplifies freeing the entries quite a bit; though there aren't that many failure paths right now, introducing filling the cache from a tree will introduce more. This makes sure not to leak memory on errors.
| * tree-cache: extract the allocationCarlos Martín Nieto2014-10-102-12/+23
|/
* Merge pull request #2593 from libgit2/cmn/remote-delete-nameEdward Thomson2014-10-104-39/+14
|\ | | | | remote: accept a repository and remote name for deletion
| * remote: accept a repository and remote name for deletioncmn/remote-delete-nameCarlos Martín Nieto2014-09-304-39/+14
| | | | | | | | | | | | | | | | We don't need the remote loaded, and the function extracted both of these from the git_remote in order to do its work, so let's remote a step and not ask for the loaded remote at all. This fixes #2390.
* | Merge pull request #2575 from cirosantilli/factor-struct-typedefCarlos Martín Nieto2014-10-106-32/+18
|\ \ | | | | | | [factor] Join typedef and struct definitions in single file.
| * | Join typedef and struct definitions in single file.Ciro Santilli2014-09-246-32/+18
| | |
* | | Fix test buildCarlos Martín Nieto2014-10-102-3/+3
| | | | | | | | | | | | | | | Some PRs have fallen out of sync with the changes in signatures, so we need to take a few extra parameters into account.
* | | Merge pull request #2498 from linquize/read-large-fileCarlos Martín Nieto2014-10-102-5/+4
|\ \ \ | | | | | | | | Can read large file larger than 2GB on Win64
| * | | Can read large file larger than 2GB on WindowsLinquize2014-08-102-5/+4
| | | |
* | | | Merge pull request #2556 from sbc100/fix_warningsCarlos Martín Nieto2014-10-101-2/+2
|\ \ \ \ | | | | | | | | | | Fix warnings in thread-utils.h when building without -DTHREADSAFE=ON
| * | | | Fix warnings in thread-utils.h when building without -DTHREADSAFE=ONSam Clegg2014-09-082-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compiler was generating a bunch of warnings for git_mutex_init and git_mutex_lock when GIT_THREADS was not defined (i.e. when not using -DTHREADSAFE=ON). Also remove an unused variable from tests/path/core.c.
* | | | | Merge pull request #2542 from linquize/fetch-headCarlos Martín Nieto2014-10-102-3/+46
|\ \ \ \ \ | | | | | | | | | | | | Do not error out when fetching from second remote
| * | | | | Add network::fetchlocal multi remotes testLinquize2014-09-021-0/+34
| | | | | |
| * | | | | When updating FETCH_HEAD, do not treat it as error if the remote of current ↵Linquize2014-09-021-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | branch is from another remote
* | | | | | Merge pull request #2600 from libgit2/cmn/embed-sshCarlos Martín Nieto2014-10-102-2/+17
|\ \ \ \ \ \ | | | | | | | | | | | | | | Provide option to embed libssh2
| * | | | | | Provide option to embed libssh2cmn/embed-sshCarlos Martín Nieto2014-10-052-2/+17
| | | | | | |
* | | | | | | Merge pull request #2588 from swansontec/ssl-cert-path2Carlos Martín Nieto2014-10-102-1/+35
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add support for setting the SSL CA location
| * | | | | | | Add support for setting the SSL CA locationWilliam Swanson2014-09-302-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows users to specify self-signed certificates, or to provide their own certificate stores on limited platforms such as mobile phones.
* | | | | | | | Merge pull request #2499 from csware/hard-reset-checkout-callbacksCarlos Martín Nieto2014-10-1013-61/+70
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Allow to propagate checkout callbacks to git HARD reset
| * | | | | | | | Allow to propagate checkout callbacks to git HARD resetSven Strickroth2014-08-0313-61/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | | | | | | | Merge pull request #2574 from csware/hostname-for-certificate_check_cbEdward Thomson2014-10-105-7/+13
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Provide host name to certificate_check_cb
| * | | | | | | | | Add tests for host namesSven Strickroth2014-10-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
| * | | | | | | | | Provide host name to certificate_check_cbSven Strickroth2014-09-225-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | | | | | | | | Merge pull request #2473 from arthurschreiber/arthur/new-javascript-test-filesEdward Thomson2014-10-1015-354/+328
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | New test files for the javascript diff driver.
| * | | | | | | | | | Update the javascript diff driver's function pattern.Arthur Schreiber2014-10-092-6/+6
| | | | | | | | | | |
| * | | | | | | | | | New test files for the javascript diff driver.Arthur Schreiber2014-10-0914-351/+325
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #2603 from libgit2/cmn/revwalk-merge-baseEdward Thomson2014-10-102-26/+101
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Walk only as far as the common ancestors of uninteresting commits
| * | | | | | | | | | | revwalk: clear first-parent flag on resetcmn/revwalk-merge-baseCarlos Martín Nieto2014-10-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should have been included when implementing the feature but was missed.
| * | | | | | | | | | | revwalk: catch no-push and no-hide casesCarlos Martín Nieto2014-10-082-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there have been no pushes, we can immediately return ITEROVER. If there have been no hides, we must not run the uninteresting pre-mark phase, as we do not want to hide anything and this would simply cause us to spend time loading objects.
| * | | | | | | | | | | revwalk: mark uninteresting only up to the common ancestorsCarlos Martín Nieto2014-10-081-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a phase at the start of preparing a walk which pre-marks uninteresting commits, but only up to the common ancestors. We do this in a similar way to git, by walking down the history and marking (which is what we used to do), but we keep a time-sorted priority queue of commits and stop marking as soon as there are only uninteresting commits in this queue. This is a similar rule to the one used to find the merge-base. As we keep inserting commits regardless of the uninteresting bit, if there are only uninteresting commits in the queue, it means we've run out of interesting commits in our walk, so we can stop. The old mark_unintesting() logic is still in place, but that stops walking if it finds an already-uninteresting commit, so it will stop on the ones we've pre-marked; but keeping it allows us to also hide those that are hidden via the callback.
| * | | | | | | | | | | revwalk: keep a single list of user inputsCarlos Martín Nieto2014-10-082-27/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old separation was due to the old merge-base finding, so it's no longer necessary.
| * | | | | | | | | | | revwalk: clear the flags on resetCarlos Martín Nieto2014-10-081-0/+1
| | |_|_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These store merge-base information which is only valid for a single run.
* | | | | | | | | | | Merge pull request #2606 from arthurschreiber/arthur/align-git-remote-fetchCarlos Martín Nieto2014-10-102-4/+4
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Treat an empty list of refspecs the same as a NULL value.
| * | | | | | | | | | | Treat an empty list of refspecs the same as a NULL value.Arthur Schreiber2014-10-102-4/+4
|/ / / / / / / / / / /
* | | | | | | | | | | Merge pull request #2592 from libgit2/cmn/describeCarlos Martín Nieto2014-10-0964-1/+1371
|\ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / |/| | | | | | | | | | Implement git-describe
| * | | | | | | | | | describe: document the APIcmn/describeCarlos Martín Nieto2014-09-301-3/+71
| | | | | | | | | | |
| * | | | | | | | | | describe: make mingw happyCarlos Martín Nieto2014-09-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MinGW compiler does not like it when we declare a typedef twice.
| * | | | | | | | | | describe: rename git_describe_opts to git_describe_optionsCarlos Martín Nieto2014-09-306-32/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And implement the option init functions for this and the format options.
| * | | | | | | | | | describe: use globs in the testsCarlos Martín Nieto2014-09-304-49/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes us be closer to git's tests, and lets us better describe what we expect from the output.
| * | | | | | | | | | describe: implement abbreviated idsCarlos Martín Nieto2014-09-301-6/+27
| | | | | | | | | | |