src


Log

Author Commit Date CI Message
Carlos Martín Nieto a34692c4 2015-03-13T18:00:15 indexer: set an error message on duplicate objects in pack While this is not even close to a fix, we can at least set an error message so we know which error we are facing. Up to know we just returned an error without a message.
Edward Thomson 12e1fff7 2015-03-12T18:04:25 Merge pull request #2973 from libgit2/cmn/local-pack-threading local: create pack with multiple threads
Carlos Martín Nieto 15f58174 2015-03-11T17:55:39 Merge commit 'refs/pull/2879/head' of ssh://github.com/libgit2/libgit2
Carlos Martín Nieto 0ef54a63 2015-03-11T17:16:39 local: create pack with multiple threads The default behaviour for the packbuilder is to perform the work in a single thread, which is fine for the public API, but we currently have no way for a user to determine the number of threads to use when creating the packfile, which makes our clone behaviour over the filesystem quite a bit slower than what git offers. This is a very particular scenario, in which we avoid spawning git by being ourselves the server-side, so it's probably ok to auto-set the threading, as the upload-pack process would do if we were talking to git.
Carlos Martín Nieto 61ccba0d 2015-03-11T16:13:31 Merge pull request #2969 from adrienthebo/remote_add_invalid_refspec refspec: report errors when parsing an invalid refspec
Carlos Martín Nieto 522df1cf 2015-03-11T03:03:54 Merge pull request #2970 from ethomson/inmemory_bare "In-memory" repos are bare by default
Adrien Thebo b523194d 2015-03-04T13:29:13 refspec: set err message on invalid refspec If a refspec could not be parsed, the git_refspec__parse function would return an error value but would not provide additional error information for the callers. This commit amends that function to set a more useful error message.
Edward Thomson 770aca94 2015-03-10T15:02:02 repository: in-memory repos are bare by default
Edward Thomson d7c81945 2015-03-09T10:18:39 Merge pull request #2964 from git-up/fixes Fixes
Edward Thomson 959482e1 2015-03-09T09:18:37 Merge pull request #2946 from tkelman/appveyor-mingw RFC: add mingw to appveyor matrix
Pierre-Olivier Latour 2461e0d2 2015-03-08T14:10:02 Removed unnecessary GIT_CHECKOUT_SKIP_UNMERGED for GIT_RESET_HARD
Carlos Martín Nieto d578b45f 2015-03-08T16:46:33 refdb: use the same id for old and new when renaming a reference When we rename a reference, we want the old and new ids to be the same one (as we did not change it). The normal code path looks up the old id from the current value of the brtanch, but by the time we look it up, it does not exist anymore and thus we write a zero id. Pass the old id explicitly instead.
Edward Thomson 01c3b184 2015-03-06T16:52:07 Merge pull request #2961 from ethomson/filter_relative_paths Filter relative paths
Edward Thomson 6a2edc5a 2015-03-06T15:16:40 filter: accept relative paths in apply_to_file
Matti Virolainen 78c34af0 2015-03-06T12:23:14 Use secure API if available.
Tony Kelman 04c5a9c0 2015-03-05T19:42:54 Add some missing definitions for mingw.org these shouldn't be necessary if _WIN32_WINNT >= _WIN32_WINNT_VISTA
Tony Kelman 1a7ea63d 2015-03-05T17:11:17 Move definitions of strcasecmp and strncasecmp to msvc-compat.h should cut down on compiler warnings with mingw
Edward Thomson 9a823bad 2015-03-06T14:37:34 filter: drop old TODO
nulltoken 05e644dd 2015-03-04T22:01:39 Drop trailing whitespaces
nulltoken 7eb76734 2015-03-04T22:01:20 branch: fix generated reflog message upon renaming
nulltoken 015d4b7b 2015-03-04T21:48:54 branch: fix generated reflog message upon creation
Carlos Martín Nieto bdf0e734 2015-03-04T14:55:56 Merge pull request #2932 from jeffhostetler/jeffhostetler/big_clone_crash Fix crash in git_clone on extremely large repos
Edward Thomson 8e851c1e 2015-03-03T16:41:59 libgit2_shutdown: free TLS data (win32) Free TLS data on thread exit (win32)
Edward Thomson 83fe60fa 2015-03-03T14:10:50 libgit2_shutdown: clear err message on shutdown Clear the error message on git_libgit2_shutdown for all versions of the library (no threads and Win32 threads). Drop the giterr_clear in clar, as that shouldn't be necessary.
Leo Yang 3a8b69d1 2015-02-26T11:47:07 Fix leak of TLS error message in shutdown (ptherad version)
Carlos Martín Nieto c69c042e 2015-03-04T12:47:59 Merge pull request #2945 from ethomson/empty_hashsig_heap diff_tform: don't compare empty hashsig_heaps
Edward Thomson f78d9b6c 2015-03-03T23:56:54 diff_tform: account for whitespace options When comparing seemingly blank files, take whitespace options into account.
Carlos Martín Nieto fe21d708 2015-03-04T00:29:37 Plug a few leaks
Edward Thomson a212716f 2015-03-03T18:19:42 diff_tform: don't compare empty hashsig_heaps Don't try to compare two empty hashsig_heaps.
Edward Thomson 9ce97782 2015-03-03T17:59:44 Merge pull request #2941 from libgit2/cmn/http-enforce-cred http: enforce the credential types
Jeff Hostetler d8be5087 2015-03-03T13:35:10 Change ifdef for MINGW32.
Carlos Martín Nieto 9a97f49e 2014-12-21T15:31:03 config: borrow refcounted references This changes the get_entry() method to return a refcounted version of the config entry, which you have to free when you're done. This allows us to avoid freeing the memory in which the entry is stored on a refresh, which may happen at any time for a live config. For this reason, get_string() has been forbidden on live configs and a new function get_string_buf() has been added, which stores the string in a git_buf which the user then owns. The functions which parse the string value takea advantage of the borrowing to parse safely and then release the entry.
Carlos Martín Nieto e892b6a9 2015-03-03T17:23:01 http: enforce the credential types The user may decide to return any type of credential, including ones we did not say we support. Add a check to make sure the user returned an object of the right type and error out if not.
Carlos Martín Nieto 76f03418 2015-03-03T17:04:38 Remove swp files
Edward Thomson 20273e4d 2015-03-03T10:08:51 Merge pull request #2934 from akikoskinen/mingw_build_fix Fix build on mingw (master branch)
Edward Thomson 018fdbb5 2015-03-03T10:08:28 Merge pull request #2913 from ethomson/stash_fixup stash: correctly stash wd modified/index deleted
Jeff Hostetler 7e9b21aa 2015-02-27T08:54:48 Fix p_ftruncate to handle big files for git_clone
Carlos Martín Nieto 4e498646 2015-01-15T16:50:31 repository: remove log message override for switching the active branch We want to use the "checkout: moving from ..." message in order to let git know when a change of branch has happened. Make the convenience functions for this goal write this message.
Carlos Martín Nieto 412a3808 2015-01-15T15:31:23 push: remove reflog message override We always use "update by push".
Carlos Martín Nieto 6bfb990d 2015-01-07T14:47:02 branch: don't accept a reflog message override This namespace is about behaving like git's branch command, so let's do exactly that instead of taking a reflog message. This override is still available via the reference namespace.
Carlos Martín Nieto 23a17803 2015-01-07T14:16:50 reset: remove reflog message override This function is meant to simulate what git does in the reset command, so we should include the reflog message in that.
Carlos Martín Nieto 659cf202 2015-01-07T12:23:05 Remove the signature from ref-modifying functions The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
Carlos Martín Nieto 99b68a2a 2015-03-03T13:47:13 Merge pull request #2908 from ethomson/safe_create Allow checkout to handle newly cloned repositories, remove `GIT_CHECKOUT_SAFE_CREATE`
Carlos Martín Nieto 31bc6c04 2015-03-03T13:25:40 branch: do capture the error code We want to ignore GIT_ENOTFOUND, but for that we need to capture the error code from the reflog deletion.
Carlos Martín Nieto 5ac2b7cb 2015-03-03T13:03:54 Merge pull request #2937 from git-up/branch_delete_reflog git_branch_delete() should ignore errors from non-existing reflogs
Pierre-Olivier Latour 79863917 2015-03-02T10:24:54 git_branch_delete() should ignore errors from non-existing reflogs
Edward Thomson bf1476f1 2015-03-02T10:35:26 win32: add the patch level to the .dll fileversion Win32 DLLs have four fields for the version number (major, minor, teeny, patch). If a consumer wants to build a custom DLL, it may be useful to set the patchlevel version number in the DLL. This value only affects the DLL version number, it does not affect the resultant "version number", which remains major.minor.teeny.
Aki Koskinen 45df2237 2015-02-27T10:53:39 Include ws2tcpip.h in order to get in6_addr It's currently required in src/openssl_stream.c only.
Aki Koskinen ec032442 2015-02-27T10:49:02 Include openssl headers last Windows headers #define some names that openssl uses too. Openssl headers #undef the offending names before reusing them. But if those offending Windows headers get included after the openssl headers the namespace is polluted and nothing good happens. Fixes issue #2850.
Aki Koskinen a944c6cc 2015-03-02T11:08:04 Don't include headers on windows that aren't available This mainly concerns mingw build.
Edward Thomson 96b82b11 2015-02-14T11:44:05 checkout: remove `GIT_CHECKOUT_SAFE_CREATE` as a strategy
Edward Thomson e6da3e44 2015-02-14T10:33:06 checkout: upgrade to `SAFE_CREATE` when no index file When the repository does not contain an index, emulate git's behavior and upgrade to `SAFE_CREATE`. This allows us to check out repositories created with `git clone --no-checkout`.
Edward Thomson 094cfc29 2015-02-14T10:03:29 cherrypick, revert: drop unnecessary SAFE_CREATE
Edward Thomson 3cbaa587 2015-02-27T04:39:54 rebase: check alloc result
Damien PROFETA a275fbc0 2015-02-05T11:40:16 Add API to add a memory buffer to an index git_index_add_frombuffer enables now to store a memory buffer in the odb and to store an entry in the index directly if the index is attached to a repository.
Jeff Hostetler c92987d1 2015-02-20T10:21:32 Fix MAX 32 bit build problem described in libgit2/libgit2#2917
Carlos Martín Nieto 5091aff7 2015-02-20T08:40:40 Merge pull request #2907 from jasonhaslam/git_packfile_unpack_race Fix race in git_packfile_unpack.
Edward Thomson 9c9aa1ba 2015-02-19T11:32:55 filter: take `temp_buf` in `git_filter_options`
Edward Thomson d05218b0 2015-02-19T11:25:26 filter: add `git_filter_list__load_ext` Refactor `git_filter_list__load_with_attr_reader` into `git_filter_list__load_ext`, which takes a `git_filter_options`.
Edward Thomson 795eaccd 2015-02-19T11:09:54 git_filter_opt_t -> git_filter_flag_t For consistency with the rest of the library, where an opt is an options *structure*.
Edward Thomson d4cf1675 2015-02-19T10:05:33 buffer: introduce git_buf_attach_notowned Provide a convenience function that creates a buffer that can be provided to callers but will not be freed via `git_buf_free`, so the buffer creator maintains the allocation lifecycle of the buffer's contents.
Edward Thomson 09866d6f 2015-02-18T11:26:03 stash: correctly stash wd modified/index deleted
Edward Thomson b49edddc 2015-02-18T09:40:52 checkout: let the stream writer close the fd
Edward Thomson f7c0125f 2015-02-18T09:28:07 filter streams: base -> parent
Edward Thomson b75f15aa 2015-02-18T09:25:32 git_writestream: from git_filter_stream
Edward Thomson 646364e7 2015-02-17T20:25:31 checkout: maintain temporary buffer for filters Let the filters use the checkout data's temporary buffer, instead of having to allocate new buffers each time.
Edward Thomson e78f5c9f 2015-01-22T16:11:36 checkout: stream the blob into the filters Use the new streaming filter API during checkout.
Edward Thomson 5555696f 2015-01-22T16:11:22 filters: stream internally Migrate the `git_filter_list_apply_*` functions over to using the new filter streams.
Edward Thomson fbdc9db3 2015-01-22T16:10:06 filters: introduce streaming filters Add structures and preliminary functions to take a buffer, file or blob and write the contents in chunks through an arbitrary number of chained filters, finally writing into a user-provided function accept the contents.
Stefan Widgren c8e02b87 2015-02-15T21:07:05 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.
Jason Haslam 8588cb0c 2015-02-14T23:43:26 Fix race in git_packfile_unpack. Increment refcount of newly added cache entries just like existing entries looked up from the cache. Otherwise the new entry can be evicted from the cache and destroyed while it's still in use.
Carlos Martín Nieto a291790a 2015-02-15T05:18:01 Merge pull request #2831 from ethomson/merge_lock merge: lock index during the merge (not just checkout)
Carlos Martín Nieto a7fa970f 2015-02-15T05:13:50 Merge pull request #2895 from ethomson/alloc_overflow allocations: test for overflow of requested size
Edward Thomson 41fae48d 2015-02-03T22:31:10 indexwriter: an indexwriter for repo operations Provide git_indexwriter_init_for_operation for the common locking pattern in merge, rebase, revert and cherry-pick.
Edward Thomson be8404a7 2015-02-03T21:51:48 merge-like operations: lock index while working
Edward Thomson 8b0ddd5d 2015-01-17T23:28:53 merge: lock the index at the start of the merge Always lock the index when we begin the merge, before we write any of the metdata files. This prevents a race where another client may run a commit after we have written the MERGE_HEAD but before we have updated the index, which will produce a merge commit that is treesame to one parent. The merge will finish and update the index and the resultant commit would not be a merge at all.
Edward Thomson 8639ea5f 2015-01-17T22:47:03 checkout: introduce GIT_CHECKOUT_DONT_WRITE_INDEX
Edward Thomson 55798fd1 2015-01-17T20:49:04 git_indexwriter: lock then write the index Introduce `git_indexwriter`, to allow us to lock the index while performing additional operations, then complete the write (or abort, unlocking the index).
Edward Thomson ffbd51ed 2015-02-13T11:38:00 rebase: `CHECKOUT_SAFE` instead of `FORCE` Switch to a standard branch-switching pattern of a `SAFE` checkout, then updating `HEAD`.
Edward Thomson 49b8293c 2015-02-13T11:20:32 rebase: allow `NULL` branch to indicate `HEAD` Don't require the branch to rebase, if given `NULL`, simply look up `HEAD`.
Edward Thomson 92e87dd7 2015-02-13T10:44:19 rebase: provide NULL `exec` on non-EXEC operations Users may want to try to pay attention to the `exec` field on all rebase operations.
Edward Thomson 0f07d54b 2015-02-13T09:35:20 pack-objects: unlock the cache on integer overflow
Edward Thomson 16942c6f 2015-02-12T17:36:48 integer overflow: use compiler intrinsics if supported gcc and clang support __builtin_add_overflow, use it whenever possible, falling back to our naive routines.
Edward Thomson 8aab36a3 2015-02-12T22:14:53 filebuf: use an int for return check
Edward Thomson f1453c59 2015-02-12T12:19:37 Make our overflow check look more like gcc/clang's Make our overflow checking look more like gcc and clang's, so that we can substitute it out with the compiler instrinsics on platforms that support it. This means dropping the ability to pass `NULL` as an out parameter. As a result, the macros also get updated to reflect this as well.
Edward Thomson 527ed59a 2015-02-13T09:18:49 win32: limit the mode to `_wopen`/`_waccess` Win32 generally ignores Unix-like mode bits that don't make any sense on the platform (eg `0644` makes no sense to Windows). But WINE complains loudly when presented with POSIXy bits. Remove them. (Thanks @phkelley)
Carlos Martín Nieto 0b2ee7c0 2015-02-13T08:56:01 Merge pull request #2883 from urkud/reget-reader-pointer Reinit `reader` pointer after reading included config file
Carlos Martín Nieto 3ca91107 2015-02-13T08:30:21 Merge pull request #2897 from leoyanggit/fix_fileop_warning Fix build warning on Android
Edward Thomson 650e45f6 2015-02-11T17:51:17 Update `khash.h` to pull request 42 https://github.com/attractivechaos/klib/pull/42/files introduces `kreallocarray`. Hook that up as our `git__reallocarray`.
Edward Thomson 1ad48c8a 2015-02-11T17:36:57 khash: update to klib f28c067
Edward Thomson 190b76a6 2015-02-11T14:52:08 Introduce git__add_sizet_overflow and friends Add some helper functions to check for overflow in a type-specific manner.
Edward Thomson 8d534b47 2015-02-11T13:01:00 p_read: ensure requested len is ssize_t Ensure that the given length to `p_read` is of ssize_t and ensure that callers test the return as if it were an `ssize_t`.
Edward Thomson ec3b4d35 2015-02-11T11:20:05 Use `size_t` to hold size of arrays Use `size_t` to hold the size of arrays to ease overflow checking, lest we check for overflow of a `size_t` then promptly truncate by packing the length into a smaller type.
Edward Thomson 2884cc42 2015-02-11T09:39:38 overflow checking: don't make callers set oom Have the ALLOC_OVERFLOW testing macros also simply set_oom in the case where a computation would overflow, so that callers don't need to.
Edward Thomson 4aa664ae 2015-02-10T23:55:07 git_buf_grow_by: increase buf asize incrementally Introduce `git_buf_grow_by` to incrementally increase the size of a `git_buf`, performing an overflow calculation on the growth.
Edward Thomson 3603cb09 2015-02-10T23:13:49 git__*allocarray: safer realloc and malloc Introduce git__reallocarray that checks the product of the number of elements and element size for overflow before allocation. Also introduce git__mallocarray that behaves like calloc, but without the `c`. (It does not zero memory, for those truly worried about every cycle.)
Edward Thomson 15d54fdd 2015-02-10T22:34:03 odb__hashlink: check st.st_size before casting
Edward Thomson 392702ee 2015-02-09T23:41:13 allocations: test for overflow of requested size Introduce some helper macros to test integer overflow from arithmetic and set error message appropriately.
Leo Yang 3556a82a 2015-02-09T17:35:25 Fix build warning on Android Always do a time_t cast on st_mtime. st_mtime on Android is not the type of time_t but has the same meaning which is the number of seconds past epoch.
Yury G. Kudryashov 17136538 2015-02-05T23:39:59 Reinit `reader` pointer after reading included config file Fixes #2869. If included file includes more files, it may reallocate cfg_file->readers, hence invalidate not only `r` pointer, but `result` pointer as well.