summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* treebuilder: rename _create() to _new()cmn/treebuilder-newCarlos Martín Nieto2014-12-274-15/+15
| | | | | | This function is a constructor, so let's name it like one and leave _create() for the reference functions, which do create/write the reference.
* Always checkout with case sensitive iteratorEdward Thomson2014-12-231-13/+2
| | | | | | | | | On a case-insensitive filesystem, we need to deal with case-changing renames (eg, foo -> FOO) by removing the old and adding the new, exactly as if we were on a case-sensitive filesystem. Update the `checkout::tree::can_cancel_checkout_from_notify` test, now that notifications are always sent case sensitively.
* Introduce test for checkout case-changing renameEdward Thomson2014-12-231-0/+77
|
* Merge pull request #2763 from libgit2/cmn/local-proto-progressEdward Thomson2014-12-201-0/+34
|\ | | | | Show progress output on fetch for the local transport
| * local: add failing test for sideband informationCarlos Martín Nieto2014-12-161-0/+34
| | | | | | | | | | | | We do not currently generate any messages when we're counting the objects, as might be expected from a local upload-pack. Assert that we do call the function when working.
* | Add more Windows reserved filenamesLinquize2014-12-191-0/+13
| |
* | COM0 is a valid path, although Windows Explorer does not allow to create thisLinquize2014-12-191-0/+2
| |
* | index tests: test capitalization before mkdirhf/master_patchEdward Thomson2014-12-181-2/+4
| |
* | Plug leaksCarlos Martín Nieto2014-12-181-0/+2
| |
* | Create miscapitialised dirs for case-sensitive filesystemsCarlos Martín Nieto2014-12-181-0/+4
| | | | | | | | | | We need these directories to exist so cl_git_mkfile() can create the files we ask it to.
* | treebuilder: take a repository for path validationEdward Thomson2014-12-175-34/+97
| | | | | | | | | | | | Path validation may be influenced by `core.protectHFS` and `core.protectNTFS` configuration settings, thus treebuilders can take a repository to influence their configuration.
* | Introduce core.protectHFS and core.protectNTFSEdward Thomson2014-12-172-3/+51
| | | | | | | | | | | | Validate HFS ignored char ".git" paths when `core.protectHFS` is specified. Validate NTFS invalid ".git" paths when `core.protectNTFS` is specified.
* | checkout: disallow bad paths on HFSEdward Thomson2014-12-1651-1/+109
| | | | | | | | | | | | | | | | HFS filesystems ignore some characters like U+200C. When these characters are included in a path, they will be ignored for the purposes of comparison with other paths. Thus, if you have a ".git" folder, a folder of ".git<U+200C>" will also match. Protect our ".git" folder by ensuring that ".git<U+200C>" and friends do not match it.
* | reference_create: validate loose namesEdward Thomson2014-12-161-3/+45
| | | | | | | | Validate loose reference names on Win32.
* | checkout: disallow bad paths on win32Edward Thomson2014-12-1683-0/+533
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disallow: 1. paths with trailing dot 2. paths with trailing space 3. paths with trailing colon 4. paths that are 8.3 short names of .git folders ("GIT~1") 5. paths that are reserved path names (COM1, LPT1, etc). 6. paths with reserved DOS characters (colons, asterisks, etc) These paths would (without \\?\ syntax) be elided to other paths - for example, ".git." would be written as ".git". As a result, writing these paths literally (using \\?\ syntax) makes them hard to operate with from the shell, Windows Explorer or other tools. Disallow these.
* | index: Check for valid paths before creating an index entryVicent Marti2014-12-161-8/+93
| |
* | win32: use NT-prefixed "\\?\" pathsEdward Thomson2014-12-162-16/+193
| | | | | | | | | | | | | | | | | | | | | | | | When turning UTF-8 paths into UCS-2 paths for Windows, always use the \\?\-prefixed paths. Because this bypasses the system's path canonicalization, handle the canonicalization functions ourselves. We must: 1. always use a backslash as a directory separator 2. only use a single backslash between directories 3. not rely on the system to translate "." and ".." in paths 4. remove trailing backslashes, except at the drive root (C:\)
* | clar: wide character comparisonsEdward Thomson2014-12-102-0/+42
| |
* | tests: use p_ instead of posix func directlyEdward Thomson2014-12-101-2/+2
|/
* push: fold unpack_ok() into finish()Carlos Martín Nieto2014-12-101-4/+0
| | | | | The push cannot be successful if we sent a bad packfile. We should return an error in that case instead of storing it elsewhere.
* core::link test: clean up junction point nameEdward Thomson2014-12-091-7/+50
|
* win32: remember to free wide env name/valueEdward Thomson2014-12-091-1/+3
|
* Merge pull request #2750 from linquize/generate.pyEdward Thomson2014-12-081-5/+5
|\ | | | | Update clar to e3985dd
| * Update clar to e3985ddLinquize2014-12-071-5/+5
| |
* | Fix broken merge tests due to autocrlf was not falseLinquize2014-12-072-0/+20
| |
* | Fix broken test suite on WindowsLinquize2014-12-071-3/+2
|/
* Merge pull request #2746 from libgit2/cmn/neg-ignore-dirEdward Thomson2014-12-061-5/+14
|\ | | | | Fix negative ignores withing ignored dirs
| * ignore: adjust test for negating inside a dirCarlos Martín Nieto2014-12-051-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Given top !top/foo in an ignore file, we should not unignore top/foo. This is an implementation detail of the git code leaking, but that's the behaviour we should show. A negation rule can only negate an exact rule it has seen before.
* | Merge pull request #2730 from libgit2/cmn/local-pushEdward Thomson2014-12-051-0/+34
|\ \ | | | | | | Adjust the local transport for the common refspec parser
| * | remote: add test for pushing and deleting with the local transportCarlos Martín Nieto2014-11-231-0/+34
| | |
* | | notes: move the notes name argumentCarlos Martín Nieto2014-12-064-11/+11
| |/ |/| | | | | | | Make it consistent between git_note_create() and git_note_remote() by putting it after the repository.
* | Merge pull request #2744 from epmatsw/spellingnulltoken2014-12-051-1/+1
|\ \ | | | | | | Spelling fixes
| * | Spelling fixesWill Stamper2014-12-041-1/+1
| | |
* | | init: return the number of initializationsEdward Thomson2014-12-041-0/+14
|/ /
* | fix cl_git_mkfile() to test for -1 rather than 0 for errors from p_creat()Jeff Hostetler2014-11-261-1/+1
| |
* | Merge pull request #2718 from libgit2/cmn/peeling-errorsEdward Thomson2014-11-233-17/+30
|\ \ | |/ |/| peel: reject bad queries with EPEEL
| * peel: reject bad queries with EINVALIDSPECcmn/peeling-errorsCarlos Martín Nieto2014-11-223-17/+30
| | | | | | | | | | | | | | | | | | | | There are some combination of objects and target types which we know cannot be fulfilled. Return EINVALIDSPEC for those to signify that there is a mismatch in the user-provided data and what the object model is capable of satisfying. If we start at a tag and in the course of peeling find out that we cannot reach a particular type, we return EPEEL.
* | Plug leaksCarlos Martín Nieto2014-11-234-6/+8
| | | | | | | | Valgrind is now clean except for libssl and libgcrypt.
* | buffer: Do not `put` anything if len is 0Vicent Marti2014-11-211-3/+2
| |
* | odb: `git_odb_object` contents are never NULLvmg/emptyVicent Marti2014-11-211-0/+18
| | | | | | | | | | | | | | This is a contract that we made in the library and that we need to uphold. The contents of a blob can never be NULL because several parts of the library (including the filter and attributes code) expect `git_blob_rawcontent` to always return a valid pointer.
* | fetch: clear the connection data on closecmn/fetch-twiceCarlos Martín Nieto2014-11-191-0/+11
|/ | | | | | | | | | | When we fetch twice with the same remote object, we did not properly clear the connection flags, so we would leak state from the last connection. This can cause the second fetch with the same remote object to fail if using a HTTP URL where the server redirects to HTTPS, as the second fetch would see `use_ssl` set and think the initial connection wanted to downgrade the connection.
* Merge pull request #2654 from linquize/missing-objEdward Thomson2014-11-188-3/+5
|\ | | | | Fix missing object in tests/resources/crlf by changing the tail commit
| * Fix missing object in tests/resources/crlf by changing the tail commitLinquize2014-10-268-3/+5
| |
* | Merge pull request #2608 from libgit2/cmn/remote-pushEdward Thomson2014-11-183-59/+114
|\ \ | | | | | | Provide a convenience function `git_remote_push()`
| * | remote: use configured push refspecs if none are givencmn/remote-pushCarlos Martín Nieto2014-11-091-4/+38
| | | | | | | | | | | | | | | If the user does not pass any refspecs to push, try to use those configured via the configuration or via add_push().
| * | push: move main test function to git_remote_push()Carlos Martín Nieto2014-11-093-59/+80
| | | | | | | | | | | | | | | | | | | | | We have the step-by-step method in the initialization function as we want to remove references based on the list of references which are already there, and we can use the convenience function for testing the main push.
| * | remote: introduce git_remote_push()Carlos Martín Nieto2014-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This function, similar in style to git_remote_fetch(), performs all the steps required for a push, with a similar interface. The remote callbacks struct has learnt about the push callbacks, letting us set the callbacks a single time instead of setting some in the remote and some in the push operation.
* | | Merge pull request #2671 from swisspol/remote_create_fixEdward Thomson2014-11-171-0/+35
|\ \ \ | | | | | | | | Fixed active_refspecs field not initialized on new git_remote objects
| * | | Fixed active_refspecs field not initialized on new git_remote objectsPierre-Olivier Latour2014-11-171-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a new remote, contrary to loading one from disk, active_refspecs was not populated. This means that if using the new remote to push, git_push_update_tips() will be a no-op since it checks the refspecs passed during the push against the base ones i.e. active_refspecs. And therefore the local refs won't be created or updated after the push operation.
* | | | Merge pull request #2693 from libgit2/cmn/push-refspec-refactorEdward Thomson2014-11-172-13/+10
|\ \ \ \ | | | | | | | | | | push: use the common refspec parser