summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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-1710-53/+123
| | | | | | 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-176-44/+151
| | | | | | Validate HFS ignored char ".git" paths when `core.protectHFS` is specified. Validate NTFS invalid ".git" paths when `core.protectNTFS` is specified.
* path: Use UTF8 iteration for HFS charsVicent Marti2014-12-163-81/+132
|
* checkout: disallow bad paths on HFSEdward Thomson2014-12-1653-1/+207
| | | | | | | | 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-162-4/+46
| | | | Validate loose reference names on Win32.
* checkout: disallow bad paths on win32Edward Thomson2014-12-1694-90/+898
| | | | | | | | | | | | | | | 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-162-23/+188
|
* tree: Check for `.git` with case insensitivyVicent Marti2014-12-161-1/+1
|
* win32: use NT-prefixed "\\?\" pathsEdward Thomson2014-12-1610-103/+591
| | | | | | | | | | | | 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
|
* Merge pull request #2756 from libgit2/cmn/push-error-concernsEdward Thomson2014-12-105-29/+15
|\ | | | | Fold `git_push_unpack_ok()` into `git_push_finish()`
| * push: reword comment on finish()cmn/push-error-concernsCarlos Martín Nieto2014-12-101-5/+7
| | | | | | | | This should make it clearer what the return value implies.
| * push: fold unpack_ok() into finish()Carlos Martín Nieto2014-12-105-26/+10
|/ | | | | The push cannot be successful if we sent a bad packfile. We should return an error in that case instead of storing it elsewhere.
* Merge pull request #2678 from libgit2/cmn/io-streamEdward Thomson2014-12-1012-612/+857
|\ | | | | Introduce stackable IO streams
| * Fix a couple of compiler warningsCarlos Martín Nieto2014-12-102-2/+2
| |
| * stream: constify the write bufferCarlos Martín Nieto2014-12-104-4/+4
| |
| * gitno: remove code which is no longer neededCarlos Martín Nieto2014-12-105-500/+17
| | | | | | | | | | | | Most of the network-facing facilities have been copied to the socket and openssl streams. No code now uses these functions directly anymore, so we can now remove them.
| * ssh: use socket_stream to perform the connectionCarlos Martín Nieto2014-12-101-8/+12
| | | | | | | | | | | | | | | | Having an ssh stream would require extra work for stream capabilities we don't need anywhere else (oob auth and command execution) so for now let's move away from the gitno connection to use socket_stream. We can introduce an ssh stream interface if and as we need it.
| * Port HTTP(S) to the new stream APICarlos Martín Nieto2014-12-101-61/+39
| |
| * Port the TCP transport to the new stream APICarlos Martín Nieto2014-12-103-57/+93
| |
| * Add an OpenSSL IO streamCarlos Martín Nieto2014-12-104-15/+418
| | | | | | | | | | | | | | This unfortunately isn't as stackable as could be possible, as it hard-codes the socket stream. This is because the method of using a custom openssl BIO is not clear, and we do not need this for now. We can still bring this in if and as we need it.
| * Introduce stackable IO streamsCarlos Martín Nieto2014-12-103-0/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently have gitno for talking over TCP, but this needs to know about both plaintext and OpenSSL connections and the code has gotten somewhat messy with ifdefs determining which version of the function should be called. In order to clean this up and abstract away the details of sending over the different types of streams, we can instead use an interface and stack stream implementations. We may not be able to use the stackability with all streams, but we are definitely be able to use the abstraction which is currently spread between different bits of gitno.
* | Merge pull request #2755 from libgit2/ntk/readme_appveyor_buildCarlos Martín Nieto2014-12-101-3/+4
|\ \ | | | | | | Minor Readme improvments
| * | readme: Add AppVeyor build status badge/linknulltoken2014-12-101-0/+1
| | |
| * | readme: Make Travis build status badge reflect the state of masternulltoken2014-12-101-1/+1
| | |
| * | readme: Trim trailing linesnulltoken2014-12-101-2/+2
|/ /
* | Merge pull request #2753 from ethomson/win32_leaksCarlos Martín Nieto2014-12-105-55/+122
|\ \ | | | | | | Win32 leaks
| * | winhttp: plug some leaksEdward Thomson2014-12-091-47/+67
| | |
| * | 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
| | |
| * | win32: remember to cleanup our hash_ctxEdward Thomson2014-12-092-0/+2
|/ /
* | 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
| | |
* | | Merge pull request #2751 from linquize/broken-test-winEdward Thomson2014-12-083-3/+22
|\ \ \ | |/ / |/| | Fix broken tests on Windows
| * | 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-062-8/+100
|\ \ | | | | | | Fix negative ignores withing ignored dirs
| * | ignore: match git's rule negation rulescmn/neg-ignore-dirCarlos Martín Nieto2014-12-051-3/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A rule can only negate something which was explicitly mentioned in the rules before it. Change our parsing to ignore a negative rule which does not negate something mentioned in the rules above it. While here, fix a wrong allocator usage. The memory for the match string comes from pool allocator. We must not free it with the general allocator. We can instead simply forget the string and it will be cleaned up.
| * | 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 #2748 from libgit2/cmn/doc-allEdward Thomson2014-12-0618-29/+127
|\ \ \ | | | | | | | | doc: add documentation to all the public structs and enums
| * | | doc: add documentation to all the public structs and enumscmn/doc-allCarlos Martín Nieto2014-12-0618-29/+127
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes them show up in the reference, even if the text itself isn't the most descriptive. These have been found with grep -Przon '\n\ntypedef struct.*?\{' -- include grep -Przon '\n\ntypedef enum.*?\{' -- include
* | | Merge pull request #2730 from libgit2/cmn/local-pushEdward Thomson2014-12-053-12/+42
|\ \ \ | | | | | | | | Adjust the local transport for the common refspec parser
| * | | local: adjust to the common refspec parsercmn/local-pushCarlos Martín Nieto2014-11-231-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer have NULL strings, but empty ones and duplicate the sides if necessar, so the first check will never do anything. While in the area, remove unnecessary ifs and early returns.
| * | | remote: add test for pushing and deleting with the local transportCarlos Martín Nieto2014-11-231-0/+34
| | | |
| * | | remote: verify there is a push foreach callback setCarlos Martín Nieto2014-11-231-1/+2
| | | |
* | | | Merge pull request #2747 from libgit2/cmn/notes-consistencyEdward Thomson2014-12-058-21/+22
|\ \ \ \ | |_|/ / |/| | | Notes API consistency fixes