Log

Author Commit Date CI Message
Carlos Martín Nieto f555f7cd 2015-10-21T20:36:38 Merge pull request #3479 from ethomson/cplusplus api: be explicit about our C linkage
Edward Thomson 0f9b6742 2015-10-21T09:24:10 win32: add c linkage guard around inttypes.h inclusion
Vicent Marti 855f048a 2015-10-21T14:41:13 Merge pull request #3478 from libgit2/vmg/crud signature: Strip crud
Vicent Marti bbe1957b 2015-10-21T12:09:29 tests: Fix warnings
Vicent Marti 128e94bb 2015-10-21T12:04:53 index: Remove unneeded consts
Vicent Marti 307c4a2b 2015-10-21T11:58:44 signature: Strip crud just like Git does
Edward Thomson 4280fabb 2015-10-15T07:10:48 Merge pull request #3466 from libgit2/cmn/quick-parse-64 revwalk: make commit list use 64 bits for time
Carlos Martín Nieto 8321596a 2015-10-15T12:22:10 Merge pull request #3444 from ethomson/add_preserves_conflict_mode Preserve modes from a conflict in `git_index_insert`
Vicent Marti d5f7aad8 2015-10-15T11:09:12 Merge pull request #3468 from libgit2/vmg/odb-lookups Fix pathological performance in ODB lookups
Vicent Marti a0a1b19a 2015-10-14T19:31:54 odb: Prioritize alternate backends For most real use cases, repositories with alternates use them as main object storage. Checking the alternate for objects before the main repository should result in measurable speedups. Because of this, we're changing the sorting algorithm to prioritize alternates *in cases where two backends have the same priority*. This means that the pack backend for the alternate will be checked before the pack backend for the main repository *but* both of them will be checked before any loose backends.
Vicent Marti 43820f20 2015-10-14T19:24:07 odb: Be smarter when refreshing backends In the current implementation of ODB backends, each backend is tasked with refreshing itself after a failed lookup. This is standard Git behavior: we want to e.g. reload the packfiles on disk in case they have changed and that's the reason we can't find the object we're looking for. This behavior, however, becomes pathological in repositories where multiple alternates have been loaded. Given that each alternate counts as a separate backend, a miss in the main repository (which can potentially be very frequent in cases where object storage comes from the alternate) will result in refreshing all its packfiles before we move on to the alternate backend where the object will most likely be found. To fix this, the code in `odb.c` has been refactored as to perform the refresh of all the backends externally, once we've verified that the object is nowhere to be found. If the refresh is successful, we then perform the lookup sequentially through all the backends, skipping the ones that we know for sure weren't refreshed (because they have no refresh API). The on-disk pack backend has been adjusted accordingly: it no longer performs refreshes internally.
Edward Thomson ac7e50dd 2015-10-14T08:30:51 Merge pull request #3453 from libgit2/cmn/warn-python CMake: be more explicit with python errors
Carlos Martín Nieto 5ffdea6f 2015-10-14T16:49:01 revwalk: make commit list use 64 bits for time 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.
Carlos Martín Nieto d8dc2b8f 2015-10-07T15:43:36 Merge pull request #3455 from Eun/master Examples: network/fetch.c transfer_progress_cb - should return a value
Eun 8b8f1f91 2015-10-07T14:01:05 fix return
Carlos Martín Nieto e3f94c71 2015-10-06T13:35:45 CMake: be more explicit with python errors There's been a few reports of users not understanding what the python error means, so spell out the options they have.
Edward Thomson ac69a823 2015-10-06T00:21:28 Merge pull request #3451 from ethomson/xdiff xdiff fixes
Edward Thomson ae195a71 2015-09-29T12:46:41 blame: guard xdiff calls for large files
Edward Thomson 6c014bcc 2015-09-29T12:18:17 diff: don't feed large files to xdiff
Edward Thomson e4352066 2015-09-28T18:25:24 merge_file: treat large files as binary 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.
Edward Thomson 46c0e6e3 2015-09-28T16:34:29 xdiff: convert size variables to size_t
Edward Thomson 4bc9b74c 2015-09-28T16:24:50 GITERR_CHECK_ALLOC_ADDn: multi-arg adders
Carlos Martín Nieto a99f33e9 2015-10-01T07:56:19 Merge pull request #3447 from arthurschreiber/arthur/fix-odb-refdb-free refdb and odb backends must provide `free` function
Arthur Schreiber d3b29fb9 2015-10-01T00:50:37 refdb and odb backends must provide `free` function 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.
Carlos Martín Nieto ba1a5553 2015-09-30T17:44:10 Merge pull request #3446 from ethomson/portability portability: use `CHECK_FUNCTION_EXISTS` for checking whether functions exist...
Edward Thomson e8ccdd6b 2015-09-30T06:29:01 Merge pull request #3445 from libgit2/cmn/ssl-null openssl: don't try to teardown an unconnected SSL context
Edward Thomson 21515f22 2015-09-29T15:49:16 index: also try conflict mode when inserting When we do not trust the on-disk mode, we use the mode of an existing index entry. This allows us to preserve executable bits on platforms that do not honor them on the filesystem. If there is no stage 0 index entry, also look at conflicts to attempt to answer this question: prefer the data from the 'ours' side, then the 'theirs' side before falling back to the common ancestor.
Edward Thomson e683d152 2015-09-30T05:49:04 qsort_r/qsort_s: detect their support
Edward Thomson 8649dfd8 2015-09-29T13:36:37 p_futimes: support using futimens when available
Carlos Martín Nieto 146a96de 2015-09-30T09:41:25 openssl: don't try to teardown an unconnected SSL context 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.
Carlos Martín Nieto 72b7c570 2015-09-30T09:17:18 Merge pull request #3411 from spraints/custom-push-headers Include custom HTTP headers
Carlos Martín Nieto c628ebca 2015-09-29T21:46:00 Merge pull request #3443 from libgit2/longpath-printf win32::longpath: don't print path
Edward Thomson 10df661b 2015-09-29T14:16:51 index: test that add_bypath preserves mode
Edward Thomson ea467e74 2015-09-28T16:46:09 win32::longpath: don't print path
Edward Thomson fc3ef147 2015-09-28T06:41:00 Merge pull request #3441 from libgit2/cmn/badssl net: add tests against badssl.com
Carlos Martín Nieto 5c5df666 2015-09-27T23:32:20 Plug some leaks
Carlos Martín Nieto 53a28705 2015-09-27T22:48:39 net: add tests against badssl.com These provide bad X.509 certificates, which we should refuse to connect to by default.
Edward Thomson a8d0b4de 2015-09-25T17:55:31 Merge pull request #3439 from bisho/master Fix binary diffs
Guille -bisho- e4b2b919 2015-09-25T10:37:41 Fix binary diffs 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-
Matt Burke d7375662 2015-09-25T10:16:16 Copy custom_headers insteach of referencing the caller's copy
Matt Burke d16c1b97 2015-09-24T10:30:37 These can be static
Matt Burke e60db3c7 2015-09-24T09:24:10 Revise custom header error messages 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".
Matt Burke 63cc5723 2015-09-24T09:13:05 Don't null-check
Matt Burke 098f1e6e 2015-09-24T09:09:48 Use an array of forbidden custom headers
Carlos Martín Nieto 588e28eb 2015-09-24T13:20:48 Merge pull request #3437 from libgit2/cmn/plug-sm submodule: plug a few leaks
Carlos Martín Nieto ab8f2c66 2015-09-23T15:09:19 submodule: plug a few leaks
Carlos Martín Nieto 27187344 2015-09-23T15:16:01 Merge pull request #3435 from ethomson/nametoolong win32: give better error message on long paths
Edward Thomson 9768ebb1 2015-09-22T23:24:30 win32: test checkout msg on long path err
Edward Thomson 92a47824 2015-09-22T23:10:56 win32: propogate filename too long errors
Carlos Martín Nieto aebddbe7 2015-09-21T06:01:03 Merge pull request #3434 from ethomson/reservednames Win32 Reserved names: don't reserve names outside the working directory
Edward Thomson cdef1fad 2015-09-18T16:46:57 Merge pull request #3433 from libgit2/cmn/config-comment Keep config comments in the same place as git
Edward Thomson 538dfc88 2015-09-17T18:12:05 repository: only reserve repo dirs in the workdir 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.
Edward Thomson e8ddd8d7 2015-09-17T17:49:32 repo::reservedname: test a submodule update Test an initial submodule update, where we are trying to checkout the submodule for the first time, and placing a file within the submodule working directory with the same name as the submodule (and consequently, the same name as the repository itself).
Carlos Martín Nieto cd677b8f 2015-09-18T12:28:05 config: buffer comments to match git's variable-adding 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.
Linquize 08313c4b 2015-09-18T11:30:50 config: test that comments are left as with git
Carlos Martín Nieto dfe2856d 2015-09-18T12:06:55 Fix a couple of warnings
Carlos Martín Nieto 403e1800 2015-09-18T12:03:43 Merge pull request #3418 from DimStar77/master pkg-config: fix directory references in libgit2.pc
Dominique Leuenberger 5540d9db 2015-09-10T16:11:10 pkg-config: fix directory references in libgit2.pc Before: libdir=/usr//usr/lib64 includedir=/usr//usr/include After: libdir=/usr/lib64 includedir=/usr/include (note the duplication of /usr in the before case)
Carlos Martín Nieto 8d6052df 2015-09-17T22:03:26 Merge pull request #3432 from ethomson/mkdir `mkdir`: split into `mkdir` and `mkdir_relative`
Edward Thomson 9ce2e7b3 2015-09-17T12:48:37 `mkdir`: cope with root path on win32
Edward Thomson e164ddb1 2015-09-17T12:23:19 win32: return EACCES in `p_lstat` 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.
Edward Thomson 81aaf370 2015-09-17T11:26:38 mkdir: chmod existing paths with `GIT_MKDIR_CHMOD`
Edward Thomson e24c60db 2015-09-17T09:42:05 mkdir: find component paths for mkdir_relative `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`.
Edward Thomson 0862ec2e 2015-09-17T09:58:38 core::mkdir tests: ensure we don't stomp symlinks in mkdir In `mkdir` and `mkdir_r`, ensure that we don't try to remove symlinks that are in our way.
Edward Thomson 08df6630 2015-09-16T18:07:56 core::mkdir tests: include absolute mkdirs
Edward Thomson ac2fba0e 2015-09-16T15:07:27 git_futils_mkdir_*: make a relative-to-base mkdir 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.
Carlos Martín Nieto add0378d 2015-09-16T17:46:24 Merge pull request #3429 from ethomson/checkout_chmod Checkout: handle mode changes
Edward Thomson eea7c850 2015-09-16T05:44:27 checkout: overwrite files with differing modes 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.
Edward Thomson 6fe32284 2015-09-16T10:17:54 checkout::tree tests: don't use hardcoded mode
Edward Thomson b4d183a7 2015-09-16T04:12:47 checkout::tree tests: don't use static buffer
Matti Virolainen 33cad995 2015-06-01T14:31:49 Check that checkout preserves filemode in working directory.
Matti Virolainen 6124d983 2015-06-01T11:16:36 Check that an executable in index is not an executable after checkout.
Edward Thomson b1f6c0b6 2015-09-14T14:58:54 Merge pull request #3428 from ethomson/clone_test_buffer Clone test buffer
Edward Thomson 8452fecc 2015-09-14T14:05:01 cl_git_path_url: assert sane static buffer size
Edward Thomson 4cc355c9 2015-09-14T13:58:38 clone::nonetwork: don't use fixed size buffer
Carlos Martín Nieto b0885675 2015-09-13T23:21:14 Merge pull request #3425 from ethomson/diriter_root Handle `git_path_diriter` instances at the drive root on Windows
Carlos Martín Nieto ceb01c09 2015-09-13T22:31:08 Merge pull request #3426 from ethomson/fs_iterator iterator: loop fs_iterator advance (don't recurse)
Edward Thomson 9d905541 2015-09-13T14:18:08 diriter: don't double '/' on posix 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.
Edward Thomson 26d7cf6e 2015-09-11T18:27:04 iterator: loop fs_iterator advance (don't recurse)
Edward Thomson 5a466bef 2015-09-13T13:59:41 diriter: don't double '/' on Windows 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.
Edward Thomson 2cde210d 2015-09-13T13:52:19 diriter: test we can iterate root Ensure that we can iterate the filesystem root and that paths come back well-formed, not with an additional '/'. (eg, when iterating `c:/`, expect that we do not get some path like `c://autoexec.bat`).
Carlos Martín Nieto f2b25261 2015-09-13T19:43:55 Merge pull request #3423 from libgit2/cmn/push-tests-inline-oid push: put the git_oid inline in the test structure
Carlos Martín Nieto e78aeefa 2015-09-13T19:43:39 Merge pull request #3420 from ethomson/iterator iterator: advance the tree iterator smartly
Carlos Martín Nieto 9562ebcd 2015-09-13T17:33:26 Merge pull request #3424 from arthurschreiber/arthur/transaction-dont-free-config Don't free config in `git_transaction_commit`.
Arthur Schreiber 548cb334 2015-09-13T16:32:24 Don't free config in `git_transaction_commit`. The config is not owned by the transaction, so please don’t free it.
Carlos Martín Nieto 1e80bf27 2015-09-13T06:21:18 Merge branch 'cmn/ignore-dir-check'
Carlos Martín Nieto 657afd35 2015-09-13T06:18:49 ignore: add test and adjust style and comment for dir with wildmatch The previous commit left the comment referencing the earlier state of the code, change it to explain the current logic. While here, change the logic to avoid repeating the copy of the base pattern.
Carlos Martín Nieto 305407e1 2015-09-13T06:03:12 Merge pull request #3370 from libgit2/cmn/submodule-refactor submodule: refactor to be more explicit in the search
Carlos Martín Nieto 1af5aecb 2015-09-13T05:38:29 push: put the git_oid inline in the test structure These are small pieces of data, so there is no advantage to allocating them separately. Include the two ids inline in the struct we use to check that the expected and actual ids match.
Carlos Martín Nieto dc5b678f 2015-09-12T22:49:23 Merge pull request #3422 from ethomson/workdir_diff diff: examine pathlist on non-files
Edward Thomson 8ab4d0e1 2015-09-12T15:32:18 diff: check pathspec on non-files When we're not doing pathspec matching, we let the iterator handle file matching for us. However, we can only trust the iterator to return *files* that match the pattern, because the iterator must return directories that are not strictly in the pathlist, but that are the parents of files that match the pattern, so that diff can later recurse into them. Thus, diff must examine non-files explicitly before including them in the delta list.
Edward Thomson 92f7d32b 2015-09-12T13:46:22 diff::workdir: ensure ignored files are not returned Ensure that a diff with the workdir is not erroneously returning directories.
Carlos Martín Nieto 049dbf42 2015-09-12T04:00:34 Merge pull request #3421 from ethomson/mempack-fix Mempack fix
Edward Thomson 220d6f8a 2015-09-11T20:06:14 mempack: expose clear function
Bryan Woods 707f6537 2015-09-11T16:35:14 Removing memory leak in mempack's free It calls git_mempack_reset which reallocates the object array. git_oidmap_free is now called on it explicitly.
Edward Thomson a1859e21 2015-09-11T17:38:28 iterator: advance the tree iterator smartly While advancing the tree iterator, if we advance over things that we aren't interested in, then call `current`. Which may *itself* call advance. While advancing the tree iterator, if we advance over things that we aren't interested in, then call `current`. Which may *itself* call advance. While advancing the tree iterator, if we advance over things that we aren't interested in, then call `current`. Which may *itself* call advance. While advancing the tree iterator, if we advance over things that we aren't interested in, then call `current`. Which may *itself* call advance. While advancing the tree iterator, if we advance over things that we aren't interested in, then call `current`. Which may *itself* call advance. Error: stack overflow.
Bryan Woods 8e177b2b 2015-09-10T14:44:52 Fixing dangling pointers in git_mempack_reset git_mempack_reset was leaving free'd pointers in the oidmap.
Carlos Martín Nieto a3b9731f 2015-09-10T21:23:03 submodule: add a test for a renamed submdoule dir
Carlos Martín Nieto f17525b0 2015-08-10T18:36:27 submodule: refactor to be more explicit in the search When searching for information about a submdoule, let's be more explicit in what we expect to find. We currently insert a submodule into the map and change certain parameters when the config callback gets called. Switch to asking for the configuration we're interested in, rather than taking it in an arbitrary order.
Matt Burke d29c5412 2015-09-10T14:16:39 Avoid segfault when opts == NULL