summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* submdule: reproduce double-reporting of a submodule in foreachCarlos Martín Nieto2015-07-111-0/+18
| | | | | | When we rename a submodule, we should be merging two sets of information based on whether their path is the same. We currently only deduplicate on equal name, which causes us to double-report.
* Merge pull request #3287 from ethomson/filter_test_cleanupCarlos Martín Nieto2015-07-021-6/+1
|\ | | | | filter::stream: free the filter sanely
| * filter::stream: free the filter sanelyEdward Thomson2015-07-021-6/+1
| | | | | | | | | | | | Don't use the filter's free callback to free the actual data structure holding the filter, as we may not always actually initialize it (the test may be skipped).
* | submodule: add failing test for loading the wrong submoduleCarlos Martín Nieto2015-07-011-0/+23
| | | | | | | | | | When two submodules are fairly similar, we may end up loading the wrong one.
* | submodule: completely remove reload_allCarlos Martín Nieto2015-07-011-2/+0
|/ | | | | | | | The function was removed, but its declaration and changelog entry about its removal were forgotten. The comment in the test doesn't make any sense as the function doesn't exist anymore, so get rid of it as well.
* index tests: add eol to avoid compiler warningEdward Thomson2015-06-301-1/+1
|
* checkout test: mark unused varsEdward Thomson2015-06-301-1/+4
|
* Merge pull request #3270 from ethomson/warnings2Carlos Martín Nieto2015-06-305-5/+6
|\ | | | | Remove some warnings
| * checkout test: check getcwd return valueEdward Thomson2015-06-291-1/+1
| |
| * clar: test chdirEdward Thomson2015-06-291-1/+1
| |
| * filter test: pass base typeEdward Thomson2015-06-291-2/+2
| |
| * stash: const up conflict paramsEdward Thomson2015-06-291-1/+1
| |
| * index test: include repository.h for declEdward Thomson2015-06-291-0/+1
| |
* | submodule: remove trailing slashes from submodule pathsCarlos Martín Nieto2015-06-291-0/+3
|/ | | | | We allow looking up a submodule by path, but we lost the path normalisation during the recent changes. Bring it back.
* Merge pull request #3265 from libgit2/leaksCarlos Martín Nieto2015-06-274-7/+27
|\ | | | | Plug a bunch of leaks
| * index, iterator, fetchhead: plug leaksleaksCarlos Martín Nieto2015-06-262-1/+7
| |
| * checkout: plug a few leaksCarlos Martín Nieto2015-06-261-5/+15
| |
| * diff: fix leaks in diff printingCarlos Martín Nieto2015-06-261-1/+5
| |
* | Merge pull request #3260 from ethomson/apply_with_reflog_indicesCarlos Martín Nieto2015-06-271-0/+34
|\ \ | | | | | | stash: test we apply using reflog-like indices
| * | stash: test we apply using reflog-like indicesEdward Thomson2015-06-261-0/+34
| |/
* | Merge pull request #3263 from git-up/fixesCarlos Martín Nieto2015-06-262-2/+0
|\ \ | |/ |/| Fixes
| * Removed unused variablesPierre-Olivier Latour2015-06-262-2/+0
| |
* | Merge pull request #3259 from ethomson/stash_apply_arghCarlos Martín Nieto2015-06-261-9/+85
|\ \ | | | | | | Stash apply: stage new files even when not updating the index
| * | stash: stage new files when unstashing themEdward Thomson2015-06-251-2/+50
| | | | | | | | | | | | | | | Files that were new (staged additions) in the stash tree should be staged when unstashing, even when not applying the index.
| * | stash: don't allow apply with staged changesEdward Thomson2015-06-251-1/+18
| | |
| * | stash apply: add a newly staged file to testsEdward Thomson2015-06-251-8/+19
| | |
* | | test-diff-blob: Pass proper nibble sizesvmg/prefix-lenVicent Marti2015-06-261-14/+14
| | |
* | | revparse: Add test to make sure this doesn't regressVicent Marti2015-06-261-0/+15
| |/ |/|
* | diff: test we don't update index unnecessarilyEdward Thomson2015-06-261-7/+69
| | | | | | | | | | Test that workdir diffs, when presented with UPDATE_INDEX, only write the index when they actually make a change.
* | Merge pull request #3255 from libgit2/cmn/rename-unspecifiedEdward Thomson2015-06-253-11/+11
|\ \ | |/ |/| Rename FALLBACK to UNSPECIFIED
| * Rename FALLBACK to UNSPECIFIEDcmn/rename-unspecifiedCarlos Martín Nieto2015-06-253-11/+11
| | | | | | | | | | Fallback describes the mechanism, while unspecified explains what the user is thinking.
* | Merge pull request #3256 from libgit2/cmn/fetch-spec-fetchheadEdward Thomson2015-06-251-0/+44
|\ \ | | | | | | remote: insert refspecs with no rhs in FETCH_HEAD
| * | remote: insert refspecs with no rhs in FETCH_HEADcmn/fetch-spec-fetchheadCarlos Martín Nieto2015-06-251-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a refspec contains no rhs and thus won't cause an explicit update, we skip all the logic, but that means that we don't update FETCH_HEAD with it, which is what the implicit rhs is. Add another bit of logic which puts those remote heads in the list of updates so we put them into FETCH_HEAD.
* | | Merge pull request #3246 from libgit2/cmn/dont-grow-borrowedEdward Thomson2015-06-251-0/+13
|\ \ \ | |_|/ |/| | Don't allow growing borrowed buffers
| * | buffer: make use of EINVALID for growing a borrowed bufferCarlos Martín Nieto2015-06-241-1/+1
| | | | | | | | | | | | | | | This explains more closely what happens. While here, set an error message.
| * | buffer: don't allow growing borrowed buffersCarlos Martín Nieto2015-06-241-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we don't own a buffer (asize=0) we currently allow the usage of grow to copy the memory into a buffer we do own. This muddles the meaning of grow, and lets us be a bit cavalier with ownership semantics. Don't allow this any more. Usage of grow should be restricted to buffers which we know own their own memory. If unsure, we must not attempt to modify it.
* | | Merge pull request #3097 from libgit2/cmn/submodule-config-stateCarlos Martín Nieto2015-06-248-236/+141
|\ \ \ | | | | | | | | Remove run-time configuration settings from submodules
| * | | submodule: test unsetting config optionsCarlos Martín Nieto2015-06-221-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | In addition to mapping enums to strings in the configuration, we need to know to delete the configuration option when given the "none" or "no" option.
| * | | submodule: test more accurately for non-existenceCarlos Martín Nieto2015-06-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The current code will always fail, but only because it's asking for a string on a live config. Take a snapshot and make sure we fail with ENOTFOUND instead of any old error.
| * | | submodule: fix potential leak in the testsCarlos Martín Nieto2015-06-221-2/+1
| | | |
| * | | submodule: get rid of `_save()`Carlos Martín Nieto2015-06-221-9/+0
| | | | | | | | | | | | | | | | | | | | We no longer have any setters which affect an instance, so `git_submodule_save()` is no longer relevant.
| * | | submodule: make `_set_url()` affect the configurationCarlos Martín Nieto2015-06-222-42/+9
| | | | | | | | | | | | | | | | With this one, we can get rid of the edit_and_save test.
| * | | submodule: make `_set_branch()` affect the configurationCarlos Martín Nieto2015-06-221-14/+20
| | | |
| * | | submodule: make `_set_update_fetch_recurse_submodules()` affect the configCarlos Martín Nieto2015-06-221-28/+16
| | | | | | | | | | | | | | | | | | | | | | | | Similarly to the other ones. In this test we copy over testing `RECURSE_YES` which shows an error in our handling of the `YES` variant which we may have to port to the rest.
| * | | submodule: make `_set_update()` affect the configurationCarlos Martín Nieto2015-06-221-21/+11
| | | | | | | | | | | | | | | | | | | | Moving on with the removal of runtime-changing variables, the update setting for a remote is whatever it was when it was looked up.
| * | | submodule: add an ignore option to statusCarlos Martín Nieto2015-06-224-49/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets us specify in the status call which ignore rules we want to use (optionally falling back to whatever the submodule has in its configuration). This removes one of the reasons for having `_set_ignore()` set the value in-memory. We re-use the `IGNORE_RESET` value for this as it is no longer relevant but has a similar purpose to `IGNORE_FALLBACK`. Similarly, we remove `IGNORE_DEFAULT` which does not have use outside of initializers and move that to fall back to the configuration as well.
| * | | submodule: don't let status change an existing instanceCarlos Martín Nieto2015-06-222-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | As submodules are becomes more like values, we should not let a status check to update its properties. Instead of taking a submodule, have status take a repo and submodule name.
| * | | submodule: make set_ignore() affect the configurationCarlos Martín Nieto2015-06-223-25/+20
| | | | | | | | | | | | | | | | | | | | Instead of affecting a particular instance, make it change the configuration.
| * | | submodule: remove the per-repo cacheCarlos Martín Nieto2015-06-222-46/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having this cache and giving them out goes against our multithreading guarantees and it makes it impossible to use submodules in a multi-threaded environment, as any thread can ask for a refresh which may reallocate some string in the submodule struct which we've accessed in a different one via a getter. This makes the submodules behave more like remotes, where each object is created upon request and not shared except explicitly by the user. This means that some tests won't pass yet, as they assume they can affect the submodule objects in the cache and that will affect later operations.
* | | | Merge pull request #3254 from ethomson/diff-binary-patchCarlos Martín Nieto2015-06-241-0/+37
|\ \ \ \ | | | | | | | | | | Handle binary DIFFABLEness properly