summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | fetch: prune after updating tipsCarlos Martín Nieto2014-12-141-3/+6
| | | | | | | | | | | | | | | This makes a fetch+prune more similar to a connect+prune and makes it more likely that we see errors in the decision to prune a reference.
| * | Test that prune overlapping works as expected.David Calavera2014-12-141-1/+0
| | |
| * | remote: prune refs when fetchingLinquize2014-12-142-0/+104
| | |
* | | Merge pull request #2762 from libgit2/cmn/hide-pushEdward Thomson2014-12-303-12/+152
|\ \ \ | | | | | | | | remote: remove git_push from the public API
| * | | remote: remove git_push from the public APIcmn/hide-pushCarlos Martín Nieto2014-12-303-12/+152
| |/ / | | | | | | | | | | | | Instead we provide git_remote_upload() and git_remote_update_tips() in order to have a parallel API for fetching and pushing.
* | | Merge pull request #2785 from jacquesg/coverityCarlos Martín Nieto2014-12-3012-21/+48
|\ \ \ | | | | | | | | Coverity fixes
| * | | Check for OOMJacques Germishuys2014-12-302-0/+4
| | | |
| * | | Added missing error handling pathJacques Germishuys2014-12-301-0/+1
| | | |
| * | | Check the result of git_buf_joinpathJacques Germishuys2014-12-302-4/+9
| | | |
| * | | Plug some leaksJacques Germishuys2014-12-298-17/+34
| | | |
* | | | Merge pull request #2784 from jacquesg/undef-statEdward Thomson2014-12-291-0/+2
|\ \ \ \ | | | | | | | | | | Undef stat for Mingw
| * | | | Undef stat firstJacques Germishuys2014-12-291-0/+2
| |/ / /
* | | | Merge pull request #2783 from libgit2/cmn/treebuilder-newEdward Thomson2014-12-292-3/+3
|\ \ \ \ | | | | | | | | | | treebuilder: rename _create() to _new()
| * | | | treebuilder: rename _create() to _new()cmn/treebuilder-newCarlos Martín Nieto2014-12-272-3/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | 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.
* | | | Added AmigaOS-specific implementation of git__timer().Sebastian Bauer2014-12-281-0/+11
|/ / / | | | | | | | | | | | | | | | | | | The clock_gettime() function is normally not available under AmigaOS, hence another solution is required. We are using now GetUpTime() that is present in current versions of this operating system.
* | | Merge pull request #2772 from ethomson/case_changing_renameCarlos Martín Nieto2014-12-241-1/+1
|\ \ \ | | | | | | | | Case changing rename
| * | | Always checkout with case sensitive iteratorEdward Thomson2014-12-231-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #2778 from ethomson/whitespace_85Carlos Martín Nieto2014-12-241-2/+2
|\ \ \ | | | | | | | | don't treat 0x85 as whitespace
| * | | don't treat 0x85 as whitespaceEdward Thomson2014-12-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | A byte value of 0x85 is not whitespace, we were conflating that with U+0085 (UTF8: 0xc2 0x85). This caused us to incorrectly treat valid multibyte characters like U+88C5 (UTF8: 0xe8 0xa3 0x85) as whitespace.
* | | | global: include sys/openssl.h for GIT_EXPORT of fnEdward Thomson2014-12-231-0/+1
|/ / / | | | | | | | | | | | | | | | The openssl setup function needs to be GIT_EXPORT'ed, be sure to include the `sys/openssl.h` header so that it is appropriately decorated as an export function.
* | | index: reuc and name entrycounts should be size_tEdward Thomson2014-12-221-4/+4
|/ / | | | | | | | | | | For the REUC and NAME entries, we use size_t internally, and we take size_t for the get_byindex() functions, but the entrycount() functions strangely cast to an unsigned int instead.
* | Merge pull request #2759 from libgit2/cmn/openssl-sysEdward Thomson2014-12-201-1/+0
|\ \ | | | | | | Make OpenSSL locking warnings more severe
| * | Make the OpenSSL locking function warnings more severeCarlos Martín Nieto2014-12-121-1/+0
| |/ | | | | | | | | Our git_openssl_set_locking() would ideally not exist. Make it clearer that we provide it as a last resort and you should prefer anything else.
* | Merge pull request #2763 from libgit2/cmn/local-proto-progressEdward Thomson2014-12-201-0/+52
|\ \ | | | | | | Show progress output on fetch for the local transport
| * | local: send 'counting objects' outputcmn/local-proto-progressCarlos Martín Nieto2014-12-161-0/+52
| |/ | | | | | | | | Pretend we have a git process at the other end by creating a similar progress output when inserting objects into the packbuilder.
* | COM0 is a valid path, although Windows Explorer does not allow to create thisLinquize2014-12-191-1/+1
| |
* | Fix ming32 compilationCarlos Martín Nieto2014-12-191-0/+2
| | | | | | | | | | We need to know what wchar_t and MAX_PATH are. Including common.h takes care of that for us.
* | treebuilder: take a repository for path validationEdward Thomson2014-12-173-16/+19
| | | | | | | | | | | | 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-174-41/+100
| | | | | | | | | | | | 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-162-0/+98
| | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | Validate loose reference names on Win32.
* | checkout: disallow bad paths on win32Edward Thomson2014-12-1611-90/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-15/+95
| |
* | tree: Check for `.git` with case insensitivyVicent Marti2014-12-161-1/+1
| |
* | win32: use NT-prefixed "\\?\" pathsEdward Thomson2014-12-168-87/+398
|/ | | | | | | | | | | | 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:\)
* push: fold unpack_ok() into finish()Carlos Martín Nieto2014-12-102-11/+5
| | | | | 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-1011-612/+817
|\ | | | | 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-103-3/+3
| |
| * 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-102-0/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | winhttp: plug some leaksEdward Thomson2014-12-091-47/+67
| |
* | win32: remember to cleanup our hash_ctxEdward Thomson2014-12-092-0/+2
| |
* | Merge pull request #2746 from libgit2/cmn/neg-ignore-dirEdward Thomson2014-12-061-3/+86
|\ \ | | | | | | 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.