summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Don't use cl_git_pass for POSIX functionsrb/minor-cleanupsRussell Belfer2014-10-101-2/+2
| | | | | | | 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.
* index: make sure to write cached subtrees if parent is invalidatedCarlos Martín Nieto2014-10-101-0/+53
| | | | | 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-101-6/+79
| | | | | | | | | | 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.
* 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.
* Merge pull request #2593 from libgit2/cmn/remote-delete-nameEdward Thomson2014-10-101-18/+3
|\ | | | | 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-301-18/+3
| | | | | | | | | | | | | | | | 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.
* | 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 #2542 from linquize/fetch-headCarlos Martín Nieto2014-10-101-0/+34
|\ \ | | | | | | Do not error out when fetching from second remote
| * | Add network::fetchlocal multi remotes testLinquize2014-09-021-0/+34
| | |
* | | Merge pull request #2499 from csware/hard-reset-checkout-callbacksCarlos Martín Nieto2014-10-1011-61/+61
|\ \ \ | | | | | | | | Allow to propagate checkout callbacks to git HARD reset
| * | | Allow to propagate checkout callbacks to git HARD resetSven Strickroth2014-08-0311-61/+61
| | | | | | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | | Merge pull request #2574 from csware/hostname-for-certificate_check_cbEdward Thomson2014-10-101-3/+8
|\ \ \ \ | | | | | | | | | | 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-221-3/+6
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | | | Merge pull request #2473 from arthurschreiber/arthur/new-javascript-test-filesEdward Thomson2014-10-1014-351/+325
|\ \ \ \ \ | | | | | | | | | | | | New test files for the javascript diff driver.
| * | | | | Update the javascript diff driver's function pattern.Arthur Schreiber2014-10-091-3/+3
| | | | | |
| * | | | | New test files for the javascript diff driver.Arthur Schreiber2014-10-0914-351/+325
| | | | | |
* | | | | | Merge pull request #2592 from libgit2/cmn/describeCarlos Martín Nieto2014-10-0957-0/+317
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Implement git-describe
| * | | | | describe: rename git_describe_opts to git_describe_optionsCarlos Martín Nieto2014-09-304-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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 describing the workdirCarlos Martín Nieto2014-09-303-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we describe the workdir, we perform a describe on HEAD and then check to see if the worktree is dirty. If it is and we have a suffix string, we append that to the buffer.
| * | | | | describe: split into gather and format stepsCarlos Martín Nieto2014-09-304-31/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of printing out to the buffer inside the information-gathering phase, write the data to a intermediate result structure. This allows us to split the options into gathering options and formatting options, simplifying the gathering code.
| * | | | | describe: rename _object() to _commit()Carlos Martín Nieto2014-09-302-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't describe arbitrary object, so let's give it the name of the one object type we accept.
| * | | | | Merge remote-tracking branch 'upstream/master' into cmn/describeCarlos Martín Nieto2014-09-30130-632/+3226
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| * | | | | object: introduce git_describe_object()nulltoken2014-04-304-0/+215
| | | | | |
| * | | | | tests: Add "describe" test repositorynulltoken2014-04-3053-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Built with the following script: #!/bin/sh test_tick () { sleep 10 } test_tick && echo one >file && git add file && git commit -m initial && one=$(git rev-parse HEAD) && git describe --always HEAD && test_tick && echo two >file && git add file && git commit -m second && two=$(git rev-parse HEAD) && test_tick && echo three >file && git add file && git commit -m third && test_tick && echo A >file && git add file && git commit -m A && test_tick && git tag -a -m A A && test_tick && echo c >file && git add file && git commit -m c && test_tick && git tag c && git reset --hard $two && test_tick && echo B >side && git add side && git commit -m B && test_tick && git tag -a -m B B && test_tick && git merge -m Merged c && merged=$(git rev-parse HEAD) && git reset --hard $two && test_tick && echo D >another && git add another && git commit -m D && test_tick && git tag -a -m D D && test_tick && git tag -a -m R R && test_tick && echo DD >another && git commit -a -m another && test_tick && git tag e && test_tick && echo DDD >another && git commit -a -m "yet another" && test_tick && git merge -m Merged $merged && test_tick && echo X >file && echo X >side && git add file side && git commit -m x
* | | | | | Merge pull request #2599 from linquize/config-trailing-spacesEdward Thomson2014-10-092-0/+18
|\ \ \ \ \ \ | | | | | | | | | | | | | | config: Handle multiple spaces that follow a configuration value and precede a comment char
| * | | | | | config: Add test cases that have trailing spaces before comment charsLinquize2014-10-042-0/+18
| | | | | | |
* | | | | | | Merge pull request #2597 from ethomson/fixupEdward Thomson2014-10-091-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Trivial fixups
| * | | | | | | p_mkdir != mkdir on win32Edward Thomson2014-10-031-2/+2
| |/ / / / / /
* | | | | | | Merge pull request #2448 from libgit2/cmn/reference-transactionEdward Thomson2014-10-091-0/+110
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Introduce reference transactions
| * | | | | | | transaction: rename lock() to lock_ref()cmn/reference-transactionCarlos Martín Nieto2014-10-091-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This leaves space for future expansion to locking other resources without having to change the API for references.
| * | | | | | | Introduce reference transactionsCarlos Martín Nieto2014-09-301-0/+110
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A transaction allows you to lock multiple references and set up changes for them before applying the changes all at once (or as close as the backend supports). This can be used for replication purposes, or for making sure some operations run when the reference is locked and thus cannot be changed.
* | | | | | | Merge pull request #2462 from libgit2/cmn/remote-fetch-refsEdward Thomson2014-10-096-38/+102
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Implement opportunistic ref updates
| * | | | | | | remote: implement opportunistic remote-tracking branch updatescmn/remote-fetch-refsCarlos Martín Nieto2014-09-301-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a list of refspecs is passed to fetch (what git would consider refspec passed on the command-line), we not only need to perform the updates described in that refspec, but also update the remote-tracking branch of the fetched remote heads according to the remote's configured refspecs. These "fetches" are not however to be written to FETCH_HEAD as they would be duplicate data, and it's not what the user asked for.
| * | | | | | | remote: use active refspec override in the testsCarlos Martín Nieto2014-09-302-28/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets us test this bit as well as getting closer to what they were trying to do.
| * | | | | | | remote: allow overriding the refspecs for download and fetchCarlos Martín Nieto2014-09-306-19/+19
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With opportunistic ref updates, git has introduced the concept of having base refspecs *and* refspecs that are active for a particular fetch. Let's start by letting the user override the refspecs for download.
* | | | | | | Add git_merge_bases_many.Arthur Schreiber2014-10-091-2/+22
| |/ / / / / |/| | | | |
* | | | | | hashsig: Export as a `sys` headervmg/hashsigVicent Marti2014-10-012-2/+2
|/ / / / /
* | | | | Merge pull request #2581 from jacquesg/stash-ignored-directoriesEdward Thomson2014-09-291-0/+17
|\ \ \ \ \ | | | | | | | | | | | | Stash ignored directories
| * | | | | Added test for stashing files in ignored directoriesJacques Germishuys2014-09-241-0/+17
| | |/ / / | |/| | |
* | | | | Merge pull request #2584 from jacquesg/pool-alignmentEdward Thomson2014-09-293-3/+3
|\ \ \ \ \ | | | | | | | | | | | | Pool/Index data is not aligned
| * | | | | Silence unused return value warningJacques Germishuys2014-09-261-1/+1
| | | | | |
| * | | | | Fixed odb foreach test failure for big-endian 64-bitJakub Čajka2014-09-261-1/+1
| | | | | |
| * | | | | Fixed merge REUC test for big-endian 64-bitJakub Čajka2014-09-261-1/+1
| |/ / / /
* | | | | Merge pull request #2559 from libgit2/cmn/free-tls-errorEdward Thomson2014-09-291-0/+14
|\ \ \ \ \ | |/ / / / |/| | | | global: free the error message when exiting a thread
| * | | | global: free the error message when exiting a threadcmn/free-tls-errorCarlos Martín Nieto2014-09-141-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | When we free the global state at thread termination, we must also free the error message in order not to leak the string once per thread.
* | | | | Merge pull request #2567 from cirosantilli/factor-41Vicent Marti2014-09-176-13/+13
|\ \ \ \ \ | | | | | | | | | | | | Factor 40 and 41 constants from source.
| * | | | | Factor 40 and 41 constants from source.Ciro Santilli2014-09-166-13/+13
| | | | | |
* | | | | | Merge pull request #2571 from libgit2/vmg/walk-up-pathVicent Marti2014-09-173-17/+45
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix `git_path_walk_up` to work with non-rooted paths