Log

Author Commit Date CI Message
Carlos Martín Nieto e8feafe3 2015-11-12T12:32:42 Bump version to 0.23.4
Carlos Martín Nieto dab55bef 2015-11-08T06:03:57 Fix warnings and a leak
Edward Thomson 41dc9f06 2015-11-05T10:49:39 Merge pull request #3501 from libgit2/cmn/for-v23 Backports for v0.23
Vicent Marti 5b6b7745 2015-10-30T18:32:34 Add test case
Vicent Marti ed4eeeb7 2015-10-30T14:02:01 merge-base: Style
Vicent Marti 0740382c 2015-10-30T11:50:43 merge-base: Do not read parents from the root
Vicent Marti 5b6af2cc 2015-10-30T11:45:52 merge-base: Remove redundant merge bases
Leo Yang faa3c89b 2015-10-30T14:12:19 Fix build for custom transport users We should explicitly include the declaration of git_strarray from "include/git2/sys/transport.h"
Carlos Martín Nieto 50225df6 2015-10-30T18:23:17 git: put NULL check at the top
Carlos Martín Nieto 9a212bf3 2015-10-30T17:51:50 git: accept NULL as argument to its stream free
Stjepan Rajko c615d29a 2015-10-26T15:33:00 Prevent segfault when parsing a reflog with oid parse error Using calloc instead of malloc because the parse error will lead to an immediate free of committer (and its properties, which can segfault on free if undefined - test_refs_reflog_reflog__reading_a_reflog_with_invalid_format_returns_error segfaulted before the fix). #3458
Vicent Marti 6bac384a 2015-10-27T22:17:32 reuc: Be smarter when inserting new REUC entries Inserting new REUC entries can quickly become pathological given that each insert unsorts the REUC vector, and both subsequent lookups *and* insertions will require sorting it again before being successful. To avoid this, we're switching to `git_vector_insert_sorted`: this keeps the REUC vector constantly sorted and lets us use the `on_dup` callback to skip an extra binary search on each insertion.
Stjepan Rajko 0e077d7f 2015-10-14T09:41:27 Fix docs typo geterr_clear -> giterr_clear
Edward Thomson 1073061e 2015-10-22T09:29:40 index: test that we round-trip nsecs Test that nanoseconds are round-tripped correctly when we read an index file that contains them. We should, however, ignore them because we don't understand them, and any new entries in the index should contain a `0` nsecs field, while existing preserving entries.
Edward Thomson 8f5f1a1a 2015-10-22T10:29:51 xdiff: reference util.h in parent directory Although CMake will correctly configure include directories for us, some people may use their own build system, and we should reference `util.h` based on where it actually lives.
Edward Thomson ba7da35e 2015-10-22T09:30:41 diff: ignore nsecs when diffing Although our index contains the literal time present in the index, we do not read nanoseconds from disk, and thus we should not use them in any comparisons, lest we always think our working directory is dirty. Guard this behind a `GIT_USE_NSECS` for future improvement.
Linquize 5e261420 2015-10-22T07:56:34 inttypes.h is built-in header file since MSVC 2013 The reason is that the types defined in libgit2's inttypes.h collide with system inttypes.h 3rd party library header files may directly reference MSVC's built-in inttypes.h Fixes #3476
Edward Thomson afed770e 2015-10-21T09:24:10 win32: add c linkage guard around inttypes.h inclusion
Vicent Marti abdbfefb 2015-10-21T11:58:44 signature: Strip crud just like Git does
Vicent Marti aef97245 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 18ff20f8 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.
Carlos Martín Nieto 486270dc 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 47e4b74a 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 66956c50 2015-09-30T05:49:04 qsort_r/qsort_s: detect their support
Edward Thomson cd768280 2015-09-29T13:36:37 p_futimes: support using futimens when available
Carlos Martín Nieto 08a2a939 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.
Edward Thomson 7dd51284 2015-09-28T16:46:09 win32::longpath: don't print path
Guille -bisho- 6aed945f 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-
Edward Thomson 1a1d5758 2015-09-22T23:24:30 win32: test checkout msg on long path err
Edward Thomson 80b4536b 2015-09-22T23:10:56 win32: propogate filename too long errors
Edward Thomson 1ffa0739 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.
Dominique Leuenberger 1568dea8 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)
Edward Thomson ad8e8fa7 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 59ac2242 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 097c5bc7 2015-09-16T10:17:54 checkout::tree tests: don't use hardcoded mode
Edward Thomson d73bf243 2015-09-16T04:12:47 checkout::tree tests: don't use static buffer
Matti Virolainen 9ae94bcc 2015-06-01T14:31:49 Check that checkout preserves filemode in working directory.
Matti Virolainen 92471142 2015-06-01T11:16:36 Check that an executable in index is not an executable after checkout.
Bryan Woods d1a7d0e1 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.
Bryan Woods 7e53d83c 2015-09-10T14:44:52 Fixing dangling pointers in git_mempack_reset git_mempack_reset was leaving free'd pointers in the oidmap.
Max Leske d960fb32 2015-08-14T15:42:59 added a single line of additional error reporting from libssh2 when failing to retrieve the list of authentication methods
Carlos Martín Nieto c1dabd18 2015-09-05T03:54:06 filebuf: follow symlinks when creating a lock file We create a lockfile to update files under GIT_DIR. Sometimes these files are actually located elsewhere and a symlink takes their place. In that case we should lock and update the file at its final location rather than overwrite the symlink.
Edward Thomson fe965028 2015-10-05T23:37:22 Merge pull request #3452 from ethomson/0.23_xdiff 0.23 xdiff
Edward Thomson bf70c359 2015-10-01T10:07:33 Update version to 0.23.3
Edward Thomson 683af196 2015-09-29T12:46:41 blame: guard xdiff calls for large files
Edward Thomson 61c6f441 2015-09-29T12:18:17 diff: don't feed large files to xdiff
Edward Thomson 7eb26267 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 5045868a 2015-09-28T16:34:29 xdiff: convert size variables to size_t
Edward Thomson f362a1b1 2015-09-28T16:24:50 GITERR_CHECK_ALLOC_ADDn: multi-arg adders
Carlos Martín Nieto 2de198b4 2015-09-05T16:48:42 Bump version to 0.23.2
Edward Thomson c7122033 2015-09-03T11:43:48 Merge pull request #3409 from libgit2/update-v23 Maintenance backports for v23
Carlos Martín Nieto bad51c51 2015-09-03T11:38:21 config: correct documentation for non-existent config file
Ben Chatelain ac1c1575 2015-08-29T17:46:34 Escape @ in doc comment
Edward Thomson a6a9cf04 2015-08-25T11:20:37 COPYING: include winhttp definition copyright Include the copyright notice from the deps/winhttp/ sources. Move the LGPL to the bottom of the file (since multiple dependencies are LGPL licensed) and include the actual copyright notices from the regex sources.
Carlos Martín Nieto 1b000610 2015-08-19T12:53:31 CMake: fall back to OpenSSL on older OS X Starting at OS X 10.8, the Security framework offers some functions which are unified across OS X and iOS. These are the functions that we use. Older versions of OS X do not have these functions and we fail to compile. In these situations, fall back to using OpenSSL for our TLS stream instead.
Carlos Martín Nieto c2549eea 2015-08-15T18:46:38 diff: don't error out on an invalid regex When parsing user-provided regex patterns for functions, we must not fail to provide a diff just because a pattern is not well formed. Ignore it instead.
Carlos Martín Nieto d994cfc8 2015-08-15T18:15:23 http: propagate the credentials callback's error code When we ask for credentials, the user may choose to return EUSER to indicate that an error has happened on its end and it wants to be given back control. We must therefore pass that back to the user instead of mentioning that it was on_headers_complete() that returned an error code. Since we can, we return the exact error code from the user (other than PASSTHROUGH) since it doesn't cost anything, though using other error codes aren't recommended.
Dan Leehr 5470fd6d 2015-08-13T22:52:52 Fix bug in git_smart__push: push_transfer_progress cb is never called The conditional checked cbs->transfer_progress then used the value in cbs->push_transfer_progress. In both cases it should be push_transfer_progress
Carlos Martín Nieto 7a215040 2015-08-11T22:51:53 remote: don't confuse tag auto-follow rules with refspec matching When we're looking to update a tag, we can't stop if the tag auto-follow rules don't say to update it. The tag might still match the refspec we were given.
Carlos Martín Nieto 40abdc65 2015-08-06T13:02:35 curl: use the most secure auth method for the proxy When curl uses a proxy, it will only use Basic unless we prompt it to try to use the most secure on it has available. This is something which git did recently, and it seems like a good idea.
Slava Karpenko 9f334ba3 2015-08-06T11:06:17 Forcing libssh2 lib location OS X may have libssh2 in diff locations, so CHECK_LIBRARY_EXISTS may check the wrong lib; forcing it to use a found directory.
Edward Thomson d72914db 2015-08-05T16:27:47 Merge pull request #3359 from nodegit/maint/v0.23-duplicate-basename-fix Fix duplicate basenames to support older VS on maint/v0.23
John Haley 2cb4b653 2015-08-05T10:19:06 Fix duplicate basenames to support older VS With Visual Studio versions 2008 and older they ignore the full path to files and only check the basename of the file to find a collision. Additionally, having duplicate basenames can break other build tools like GYP. This fixes https://github.com/libgit2/libgit2/issues/3356
Carlos Martín Nieto f6dedf2c 2015-08-03T20:07:35 Bump version to v0.23.1
Carlos Martín Nieto 5915a2a2 2015-08-03T19:25:03 Merge pull request #3349 from libgit2/cmn/for-v23 A second round of 0.23 maint updates
Edward Thomson 16cee5d6 2015-08-03T08:17:47 Stage an unregistered submodule in _add_bypath()
Carlos Martín Nieto 62a273cc 2015-07-24T19:22:41 filebuf: remove lockfile upon rename errors When we have an error renaming the lockfile, we need to make sure that we remove it upon cleanup. For this, we need to keep track of whether we opened the file and whether the rename succeeded. If we did create the lockfile but the rename did not succeed, we remove the lockfile. This won't protect against all errors, but the most common ones (target file is open) does get handled.
Carlos Martín Nieto adb8f8d0 2015-07-24T18:44:29 filebuf: failing test for leaving the lockfile when failing to rename When we fail to rename, we currently leave the lockfile laying around. This shows that behaviour.
Tony Kelman e874f3c1 2015-07-05T10:07:48 Increase required version of cmake to 2.8
Simon 7483e08f 2015-08-03T07:38:07 Handle ssh:// and git:// urls containing a '~' character. For such a path '/~/...' the leading '/' is stripped so the server will get a path starting with '~' and correctly handle it.
Stefan Widgren a299d0af 2015-07-31T16:23:11 Remove extra semicolon outside of a function Without this change, compiling with gcc and pedantic generates warning: ISO C does not allow extra ‘;’ outside of a function.
Carlos Martín Nieto e5a77249 2015-08-01T15:38:04 Cherry-pick PR #3332: Resolve documentation warnings
Anders Borum a91dff89 2015-07-29T22:23:00 case-insensitive check for WWW-Authenticate header Fixes issue #3338
Carlos Martín Nieto c5d43178 2015-07-27T13:31:06 iterator: adjust unreadable-dir test to new behaviour We don't want the iterator to make us stop whenever we hit an unreadable dir. We should instead move over to the next item.
Carlos Martín Nieto a4ded362 2015-07-26T17:19:22 iterator: skip over errors in diriter init An error here will typically mean that the directory was removed between the time we iterated the parent and the time we wanted to visit it in which case we should ignore it. Other kinds of errors such as permissions (or transient errors) also better dealt with by pretending we didn't see it.
Carlos Martín Nieto 6a0d5696 2015-08-01T15:37:04 Merge pull request #3333 from libgit2/cmn/for-v23 Maintenance updates for v0.23
Sven Strickroth ac1a5e20 2015-07-21T23:36:39 Make libgit2 work on Windows Vista again (fixes issue #3316) Signed-off-by: Sven Strickroth <email@cs-ware.de>
Ryan Roden-Corrent 555b3518 2015-07-20T09:21:36 Document git_fetch_options struct and fix typo. git_fetch_options was missing from the API docs because it lacked a documentation comment above the struct declaration. I used the git_checkout_options docstring as a template. Also fixes a typo in git_remote_prune_refs (remote, not reamote).
Fallso 2563101b 2015-07-14T15:33:56 Fix macro redefinition warning
Carlos Martín Nieto 55bc1351 2015-07-13T09:08:32 submodule: normalize slashes in resolve_url Our path functions expect to work with slashes, so convert a path with backslashes into one with slashes at the top of the function.
Carlos Martín Nieto a89a756d 2015-07-13T08:39:35 submodule: add failing test for backslash in url
Matthew Plough 38dc9940 2015-06-30T19:00:41 Fix #3094 - improve use of portable size_t/ssize_t format specifiers. The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
Carlos Martín Nieto 34ff34fd 2015-07-12T13:28:03 filter: make sure to close the stream even on error When the stream list init or write fail, we must also make sure to close the stream, as that's the function contract.
Carlos Martín Nieto 678c4aac 2015-07-11T19:41:03 index: allow add_bypath to update submodules Similarly to how git itself does it, allow the index update operation to stage a change in a submodule's HEAD.
Carlos Martín Nieto aafaa491 2015-07-11T19:03:38 blob: fail to create a blob from a dir with EDIRECTORY This also affects `git_index_add_bypath()` by providing a better error message and a specific error code when a directory is passed.
Carlos Martín Nieto 7624b91f 2015-07-11T18:51:36 errors: add EDIRECTORY This is to be returned when the operation which the user asked for is not possible to do on a directory.
Carlos Martín Nieto e48dd86e 2015-07-11T18:31:28 submodule: lookup the submodule by path if available If we get the path from the gitmodules file, look up the submodule we're interested in by path, rather then by name. Otherwise we might get duplicate results.
Carlos Martín Nieto 1207b8f2 2015-07-11T13:32:57 submdule: reproduce double-reporting of a submodule in foreach When we rename a submodule, we should be merging two sets of information based on whether their path is the same. We currently only deduplicate on equal name, which causes us to double-report.
Edward Thomson f2dc6b77 2015-06-30T13:41:01 khash: add eol so picky compilers stop warning
Edward Thomson a4743de8 2015-07-10T09:21:59 xdiff: cleanup some warnings
Edward Thomson 75d0b81a 2015-07-07T16:46:48 xdiff: upgrade to core git 2.4.5 Upgrade xdiff to version used in core git 2.4.5 (0df0541). Corrects an issue where an LF is added at EOF while applying an unrelated change (ba31180), cleans up some unused code (be89977 and e5b0662), and provides an improved callback to avoid leaking internal (to xdiff) structures (467d348). This also adds some additional functionality that we do not yet take advantage of, namely the ability to ignore changes whose lines are all blank (36617af).
Edward Thomson ba6b2884 2015-07-07T16:46:20 revert: correct test that added trailing newline
Edward Thomson 9ff89eaa 2015-07-07T16:59:14 merge_files: don't add trailing newlines When invoked with three files that each lack a trailing newline, the merge result should also lack a trailing newline.
Tony Kelman f5740391 2015-07-07T06:55:05 Fix undefined reference with old versions of openssl Versions prior to 0.9.8f did not have this function, rhel/centos5 are still on a heavily backported version of 0.9.8e and theoretically supported until March 2017 Without this ifdef, I get the following link failure: ``` CMakeFiles/libgit2_clar.dir/src/openssl_stream.c.o: In function `openssl_connect': openssl_stream.c:(.text+0x45a): undefined reference to `SSL_set_tlsext_host_name' collect2: error: ld returned 1 exit status make[6]: *** [libgit2_clar] Error 1 ```
Carlos Martín Nieto 159061a8 2015-07-06T16:23:44 Update CHANGELOG with the release number
Carlos Martín Nieto 4d6362b1 2015-07-03T16:29:32 Merge pull request #3290 from libgit2/cmn/filter-doc filter: add docs for streaming filters
Carlos Martín Nieto a94d3e68 2015-07-03T14:34:30 filter: add docs for streaming filters These functions are available on the public API but don't have any documentation, so they don't appear on the API reference. Fix that.
Carlos Martín Nieto 99090a85 2015-07-03T00:38:33 Merge pull request #3289 from ethomson/warnings4 iterator_walk: cast away constness for free
Carlos Martín Nieto f034c851 2015-07-02T17:55:16 Merge pull request #3287 from ethomson/filter_test_cleanup filter::stream: free the filter sanely
Edward Thomson dd6b24b1 2015-07-02T10:36:15 iterator_walk: cast away constness for free