summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* revwalk: make commit list use 64 bits for timecmn/quick-parse-64Carlos Martín Nieto2015-10-142-4/+4
| | | | | | | | We moved the "main" parsing to use 64 bits for the timestamp, but the quick parsing for the revwalk did not. This means that for large timestamps we fail to parse the time and thus the walk. Move this parser to use 64 bits as well.
* blame: guard xdiff calls for large filesEdward Thomson2015-10-053-9/+29
|
* diff: don't feed large files to xdiffEdward Thomson2015-10-057-17/+20
|
* merge_file: treat large files as binaryEdward Thomson2015-10-054-82/+82
| | | | | | | | xdiff craps the bed on large files. Treat very large files as binary, so that it doesn't even have to try. Refactor our merge binary handling to better match git.git, which looks for a NUL in the first 8000 bytes.
* xdiff: convert size variables to size_tEdward Thomson2015-10-053-50/+110
|
* GITERR_CHECK_ALLOC_ADDn: multi-arg addersEdward Thomson2015-10-051-0/+9
|
* refdb and odb backends must provide `free` functionArthur Schreiber2015-10-012-8/+3
| | | | | | | | | As refdb and odb backends can be allocated by client code, libgit2 can’t know whether an alternative memory allocator was used, and thus should not try to call `git__free` on those objects. Instead, odb and refdb backend implementations must always provide their own `free` functions to ensure memory gets freed correctly.
* Merge pull request #3446 from ethomson/portabilityCarlos Martín Nieto2015-09-302-14/+22
|\ | | | | portability: use `CHECK_FUNCTION_EXISTS` for checking whether functions exist...
| * qsort_r/qsort_s: detect their supportEdward Thomson2015-09-301-13/+8
| |
| * p_futimes: support using futimens when availableEdward Thomson2015-09-301-1/+14
| |
* | openssl: don't try to teardown an unconnected SSL contextcmn/ssl-nullCarlos Martín Nieto2015-09-301-1/+6
| | | | | | | | | | | | SSL_shutdown() does not like it when we pass an unitialized ssl context to it. This means that when we fail to connect to a host, we hide the error message saying so with OpenSSL's indecipherable error message.
* | Merge pull request #3411 from spraints/custom-push-headersCarlos Martín Nieto2015-09-307-7/+135
|\ \ | | | | | | Include custom HTTP headers
| * | Copy custom_headers insteach of referencing the caller's copyMatt Burke2015-09-255-24/+26
| | |
| * | These can be staticMatt Burke2015-09-242-4/+4
| | |
| * | Revise custom header error messagesMatt Burke2015-09-241-40/+44
| | | | | | | | | | | | | | | | | | | | | | | | If the header doesn't look like a header (e.g. if it doesn't have a ":" or if it has newlines), report "custom HTTP header '%s' is malformed". If the header has the same name as a header already set by libgit2 (e.g. "Host"), report "HTTP header '%s' is already set by libgit2".
| * | Don't null-checkMatt Burke2015-09-241-3/+0
| | |
| * | Use an array of forbidden custom headersMatt Burke2015-09-241-9/+12
| | |
| * | Avoid segfault when opts == NULLMatt Burke2015-09-101-3/+8
| | |
| * | Add a test for custom header validationMatt Burke2015-09-101-6/+12
| | | | | | | | | | | | Also, *some* custom headers actually are valid.
| * | More specific namesMatt Burke2015-09-101-4/+4
| | |
| * | Validate custom http headersMatt Burke2015-09-101-0/+53
| | |
| * | Ignore NULL headersMatt Burke2015-09-102-11/+14
| | |
| * | Accept custom headers for fetch tooMatt Burke2015-09-101-2/+6
| | |
| * | o iMatt Burke2015-09-081-0/+1
| | |
| * | Teach winhttp about the extra headersMatt Burke2015-09-081-0/+17
| | |
| * | Hook up the custom_headers to the http transportMatt Burke2015-09-083-4/+16
| | |
| * | Tell the git_transport about the custom_headersMatt Burke2015-09-083-6/+19
| | |
| * | Drop extra_http_headers from git_remoteMatt Burke2015-09-084-15/+0
| | |
| * | Allow the world to set HTTP headers for remotesMatt Burke2015-09-043-3/+13
| | |
| * | Pull extra_http_headers from the git_remoteMatt Burke2015-09-043-0/+4
| | |
| * | Put the extra headers on the connection_data insteadMatt Burke2015-09-042-4/+4
| | |
| * | Add more headers to HTTP requestsMatt Burke2015-09-041-0/+9
| | |
* | | Plug some leaksCarlos Martín Nieto2015-09-271-0/+3
| | |
* | | Fix binary diffsGuille -bisho-2015-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git expects an empty line after the binary data: literal X ...binary data... <empty_line> The last literal block of the generated patches were not containing the required empty line. Example: diff --git a/binary_file b/binary_file index 3f1b3f9098131cfecea4a50ff8afab349ea66d22..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644 GIT binary patch literal 8 Pc${NM&PdElPvrst3ey5{ literal 6 Nc${NM%g@i}0ssZ|0lokL diff --git a/binary_file2 b/binary_file2 index 31be99be19470da4af5b28b21e27896a2f2f9ee2..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644 GIT binary patch literal 8 Pc${NM&PdElPvrst3ey5{ literal 13 Sc${NMEKbZyOexL+Qd|HZV+4u- git apply of that diff results in: error: corrupt binary patch at line 9: diff --git a/binary_file2 b/binary_file2 fatal: patch with only garbage at line 10 The proper formating is: diff --git a/binary_file b/binary_file index 3f1b3f9098131cfecea4a50ff8afab349ea66d22..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644 GIT binary patch literal 8 Pc${NM&PdElPvrst3ey5{ literal 6 Nc${NM%g@i}0ssZ|0lokL diff --git a/binary_file2 b/binary_file2 index 31be99be19470da4af5b28b21e27896a2f2f9ee2..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644 GIT binary patch literal 8 Pc${NM&PdElPvrst3ey5{ literal 13 Sc${NMEKbZyOexL+Qd|HZV+4u-
* | | Merge pull request #3437 from libgit2/cmn/plug-smCarlos Martín Nieto2015-09-241-13/+21
|\ \ \ | | | | | | | | submodule: plug a few leaks
| * | | submodule: plug a few leakscmn/plug-smCarlos Martín Nieto2015-09-241-13/+21
| | | |
* | | | win32: propogate filename too long errorsEdward Thomson2015-09-221-8/+15
|/ / /
* | | Merge pull request #3434 from ethomson/reservednamesCarlos Martín Nieto2015-09-211-4/+20
|\ \ \ | | | | | | | | Win32 Reserved names: don't reserve names outside the working directory
| * | | repository: only reserve repo dirs in the workdirEdward Thomson2015-09-181-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check that the repository directory is beneath the workdir before adding it to the list of reserved paths. If it is not, then there is no possibility of checking out files into it, and it should not be a reserved word. This is a particular problem with submodules where the repo directory may be in the super's .git directory.
* | | | config: buffer comments to match git's variable-addingcmn/config-commentCarlos Martín Nieto2015-09-181-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there is a comment at the end of a section, git keeps it there, while we write the new variable right at the end. Keep comments buffered and dump them when we're going to output a variable or section, or reach EOF. This puts us in line with the config files which git produces.
* | | | `mkdir`: cope with root path on win32Edward Thomson2015-09-172-4/+5
| | | |
* | | | win32: return EACCES in `p_lstat`Edward Thomson2015-09-171-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | Don't coalesce all errors into ENOENT. At least identify EACCES. All callers should be handling this case already, as the POSIX `lstat` will return this.
* | | | mkdir: chmod existing paths with `GIT_MKDIR_CHMOD`Edward Thomson2015-09-171-42/+49
| | | |
* | | | mkdir: find component paths for mkdir_relativeEdward Thomson2015-09-171-44/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `git_futils_mkdir` does not blindly call `git_futils_mkdir_relative`. `git_futils_mkdir_relative` is used when you have some base directory and want to create some path inside of it, potentially removing blocking symlinks and files in the process. This is not suitable for a general recursive mkdir within the filesystem. Instead, when `mkdir` is being recursive, locate the first existent parent directory and use that as the base for `mkdir_relative`.
* | | | core::mkdir tests: ensure we don't stomp symlinks in mkdirEdward Thomson2015-09-172-0/+17
| | | | | | | | | | | | | | | | | | | | In `mkdir` and `mkdir_r`, ensure that we don't try to remove symlinks that are in our way.
* | | | git_futils_mkdir_*: make a relative-to-base mkdirEdward Thomson2015-09-176-31/+32
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter assumes that we own everything beneath the base, as if it were being called with a base of the repository or working directory, and is tailored towards checkout and ensuring that there is no bogosity beneath the base that must be cleaned up. This is (at best) slow and (at worst) unsafe in the larger context of a filesystem where we do not own things and cannot do things like unlink symlinks that are in our way.
* | | checkout: overwrite files with differing modesEdward Thomson2015-09-161-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a file exists on disk and we're checking out a file that differs in executableness, remove the old file. This allows us to recreate the new file with p_open, which will take the new mode into account and handle setting the umask properly. Remove any notion of chmod'ing existing files, since it is now handled by the aforementioned removal and was incorrect, as it did not take umask into account.
* | | Merge pull request #3425 from ethomson/diriter_rootCarlos Martín Nieto2015-09-131-2/+10
|\ \ \ | | | | | | | | Handle `git_path_diriter` instances at the drive root on Windows
| * | | diriter: don't double '/' on posixEdward Thomson2015-09-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | The canonical directory path of the root directory of a volume on POSIX already ends in a slash (eg, `/`). This is true only at the root. Do not add a slash to paths in this case.
| * | | diriter: don't double '/' on WindowsEdward Thomson2015-09-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | The canonical directory path of the root directory of a volume on windows already ends in a slash (eg, `c:/`). This is true only at the volume root. Do not add a slash to paths in this case.