summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* remote: failing test for renameCarlos Martín Nieto2014-06-061-0/+30
| | | | | When there is a reference in the target namespace, we should overwrite it. Instead it gets a different name under the current code.
* Merge pull request #2395 from libgit2/cmn/ref-iter-concurrentRussell Belfer2014-06-031-0/+33
|\ | | | | Concurrent ref iterator access
| * refs: failing test for concurrent ref accessCarlos Martín Nieto2014-06-021-0/+33
| | | | | | | | | | If we remove a reference while we're iterating through the packed refs, the position in the iterator will be off.
* | Merge pull request #2389 from ↵Vicent Marti2014-06-031-0/+9
|\ \ | | | | | | | | | | | | arthurschreiber/arthur/set-error-when-no-remote-found Remote: Set an error when a remote cannot be found.
| * | Remote: Set an error when a remote cannot be found.Arthur Schreiber2014-05-301-0/+9
| | | | | | | | | | | | | | | | | | | | | Inside `git_remote_load`, the calls to `get_optional_config` use `giterr_clear` to unset any errors that are set due to missing config keys. If neither a fetch nor a push url config was found for a remote, we should set an error again.
* | | Plug a leak in the testsCarlos Martín Nieto2014-06-031-0/+2
| |/ |/|
* | Ignore core.safecrlf=warn until we have a warn infrastructureEdward Thomson2014-05-301-0/+41
|/
* Refs: Extend unicode test for branch creation.Arthur Schreiber2014-05-301-0/+3
| | | | | | This adds another assertion to ensure that the reference name inside the git_reference struct returned by `git_branch_create` is returned as precomposed if `core.precomposeunicode` is enabled.
* Refs: Add a unicode test for git_branch_move.Arthur Schreiber2014-05-301-0/+17
| | | | | This tests that decomposed branch names are correctly precomposed when passed to `git_branch_move` and `core.precomposeunicode` is enabled.
* Merge pull request #2011 from libgit2/cmn/clone-localVicent Marti2014-05-292-0/+131
|\ | | | | Local clone
| * clone: more explicit local testscmn/clone-localCarlos Martín Nieto2014-05-291-14/+29
| | | | | | | | | | Assert the exact amount of links we expect. While there, check that a plain git_clone() automatically chooses to link.
| * clone: allow for linking in local cloneCarlos Martín Nieto2014-05-281-0/+59
| | | | | | | | | | | | | | | | If requested, git_clone_local_into() will try to link the object files instead of copying them. This only works on non-Windows (since it doesn't have this) when both are on the same filesystem (which are unix semantics).
| * fileops: allow linking files when copying directory structuresCarlos Martín Nieto2014-05-281-0/+26
| | | | | | | | | | When passed the LINK_FILES flag, the recursive copy will hardlink files instead of copying them.
| * clone: add flag not to linkCarlos Martín Nieto2014-05-281-0/+2
| |
| * clone: add flags to override whether to perform a local cloneCarlos Martín Nieto2014-05-281-0/+29
| |
* | Merge pull request #2380 from libgit2/cmn/index-add-modesVicent Marti2014-05-281-0/+15
|\ \ | | | | | | index: check for valid filemodes on add
| * | index: check for valid filemodes on addcmn/index-add-modesCarlos Martín Nieto2014-05-221-0/+15
| |/
* | Merge pull request #2385 from karipe/developmentVicent Marti2014-05-282-3/+3
|\ \ | | | | | | Fix compile error on Visual Studio
| * | Fix compile error on Visual StudioCha, Hojeong2014-05-272-3/+3
| |/
* | Modify GIT_MERGE_CONFIG -> GIT_MERGE_PREFERENCEEdward Thomson2014-05-271-18/+18
| |
* | Move GIT_MERGE_CONFIG_* to its own enumEdward Thomson2014-05-271-31/+38
| |
* | Introduce GIT_MERGE_CONFIG_* for merge.ff settingsEdward Thomson2014-05-271-0/+26
|/ | | | | | git_merge_analysis will now return GIT_MERGE_CONFIG_NO_FASTFORWARD when merge.ff=false and GIT_MERGE_CONFIG_FASTFORWARD_ONLY when merge.ff=true
* Merge pull request #2376 from libgit2/cmn/remote-symrefVicent Marti2014-05-222-0/+68
|\ | | | | Add support for the symref extension
| * remote: add api to guess the remote's default branchCarlos Martín Nieto2014-05-211-0/+50
| | | | | | | | | | If the remote supports the symref protocol extension, then we return that, otherwise we guess with git's rules.
| * remote: expose the remote's symref mappingsCarlos Martín Nieto2014-05-211-0/+18
| | | | | | | | | | Add a symref_target field to git_remote_head to expose the symref mappings to the user.
* | Merge pull request #2375 from libgit2/rb/safecrlf-on-lf-platformVicent Marti2014-05-222-3/+21
|\ \ | |/ |/| Make core.safecrlf not generate an error on LF-ending platforms
| * Make core.safecrlf work on LF-ending platformsRussell Belfer2014-05-192-3/+21
| | | | | | | | | | | | If you enabled core.safecrlf on an LF-ending platform, we would error even for files with all LFs. We should only be warning on irreversible mappings, I think.
* | Fix a leak in the testsCarlos Martín Nieto2014-05-201-1/+1
|/
* Merge pull request #2354 from libgit2/cmn/clone-into-mirrorVicent Marti2014-05-192-0/+59
|\ | | | | Allow mirror-clone via `git_clone_into()`
| * clone: add failing test for a mirror-clone with clone_intoCarlos Martín Nieto2014-05-192-0/+59
| | | | | | | | | | Show a failure to perform a mirror-clone from a repository, both local and remote.
* | message: don't assume the comment charcmn/comment-charCarlos Martín Nieto2014-05-182-8/+8
| | | | | | | | | | The comment char is configurable and we need to provide a way for the user to specify which comment char they chose for their message.
* | Fix a bug in the pack::packbuilder suitePhilip Kelley2014-05-171-0/+2
| |
* | Merge pull request #2362 from libgit2/rb/update-4k-to-8kVicent Marti2014-05-171-0/+114
|\ \ | | | | | | Test and fix Git diff binary detection compatibility
| * | Git binary check compat testsrb/update-4k-to-8kRussell Belfer2014-05-161-0/+114
| | | | | | | | | | | | | | | A variety of data patterns for diffs verified to match the behavior of binary detection with Git on the command line.
* | | Merge pull request #2313 from libgit2/cmn/remote-deleteVicent Marti2014-05-163-0/+93
|\ \ \ | |/ / |/| | Remote deletion
| * | remote: remove remote-tracking branches on deleteCarlos Martín Nieto2014-05-161-4/+8
| | | | | | | | | | | | | | | When we delete a remote, we also need to go through its fetch refspecs and remove the references they create locally.
| * | remote: Introduce git_remote_delete()nulltoken2014-04-301-0/+57
| | |
| * | tests: Introduce count_config_entries_match() helpernulltoken2014-04-302-0/+32
| | |
* | | Better search path sandboxingrb/restore-search-pathsRussell Belfer2014-05-158-66/+54
| |/ |/| | | | | | | | | | | There are a number of tests that modify the global or system search paths during the tests. This adds a helper function to make it easier to restore those paths and makes sure that they are getting restored in a manner that preserves test isolation.
* | Merge pull request #2328 from libgit2/rb/how-broken-can-ignores-beVicent Marti2014-05-132-1/+108
|\ \ | | | | | | Improve checks for ignore containment
| * | Improve checks for ignore containmentrb/how-broken-can-ignores-beRussell Belfer2014-05-062-1/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The diff code was using an "ignored_prefix" directory to track if a parent directory was ignored that contained untracked files alongside tracked files. Unfortunately, when negative ignore rules were used for directories inside ignored parents, the wrong rules were applied to untracked files inside the negatively ignored child directories. This commit moves the logic for ignore containment into the workdir iterator (which is a better place for it), so the ignored-ness of a directory is contained in the frame stack during traversal. This allows a child directory to override with a negative ignore and yet still restore the ignored state of the parent when we traverse out of the child. Along with this, there are some problems with "directory only" ignore rules on container directories. Given "a/*" and "!a/b/c/" (where the second rule is a directory rule but the first rule is just a generic prefix rule), then the directory only constraint was having "a/b/c/d/file" match the first rule and not the second. This was fixed by having ignore directory-only rules test a rule against the prefix of a file with LEADINGDIR enabled. Lastly, spot checks for ignores using `git_ignore_path_is_ignored` were tested from the top directory down to the bottom to deal with the containment problem, but this is wrong. We have to test bottom to top so that negative subdirectory rules will be checked before parent ignore rules. This does change the behavior of some existing tests, but it seems only to bring us more in line with core Git, so I think those changes are acceptable.
* | | Merge pull request #2336 from libgit2/rb/unicode-branch-namesRussell Belfer2014-05-122-1/+58
|\ \ \ | | | | | | | | Pass unconverted Unicode path data when iconv doesn't like it
| * | | Don't always test composed-insensitive lookupsrb/unicode-branch-namesRussell Belfer2014-05-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Only on a filesystem that is composed/decomposed insensitive, should be testing that a branch can be looked up by the opposite form and still work correctly.
| * | | Allow cl_repo_get_bool to work with missing keyRussell Belfer2014-05-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the test helpers provides a quick way for looking up a boolean key. But if the key way missing completely, the check would actually raise an error. Given the way we use this helper, if the key is missing, this should just return false, I think.
| * | | Pass unconverted data when iconv doesn't like itRussell Belfer2014-05-081-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using Iconv to convert unicode data and iconv doesn't like the source data (because it thinks that it's not actual UTF-8), instead of stopping the operation, just use the unconverted data. This will generally do the right thing on the filesystem, since that is the source of the non-UTF-8 path data anyhow. This adds some tests for creating and looking up branches with messy Unicode names. Also, this takes the helper function that was previously internal to `git_repository_init` and makes it into `git_path_does_fs_decompose_unicode` which is a useful in tests to understand what the expected results should be.
* | | | Merge pull request #2334 from libgit2/rb/fix-2333Russell Belfer2014-05-121-3/+10
|\ \ \ \ | | | | | | | | | | Be more careful with user-supplied buffers
| * | | | Be more careful with user-supplied buffersrb/fix-2333Russell Belfer2014-05-081-3/+10
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds in missing calls to `git_buf_sanitize` and fixes a number of places where `git_buf` APIs could inadvertently write NUL terminator bytes into invalid buffers. This also changes the behavior of `git_buf_sanitize` to NUL terminate a buffer if it can and of `git_buf_shorten` to do nothing if it can. Adds tests of filtering code with zeroed (i.e. unsanitized) buffer which was previously triggering a segfault.
* | | | Don't scale diff stat when not neededRussell Belfer2014-05-121-0/+4
| | | |
* | | | Merge pull request #2300 from libgit2/cmn/match-host-testsRussell Belfer2014-05-121-0/+13
|\ \ \ \ | | | | | | | | | | Some improvements to the cert checking
| * | | | netops: unit-test the cert host-name pattern matchingCarlos Martín Nieto2014-04-261-0/+13
| | |_|/ | |/| | | | | | | | | | | | | | This kind of stuff should have unit tests, even if it's just to show what we expect to match successfully.