summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | filters: stream internallyEdward Thomson2015-02-171-73/+81
| | | | | | | | | | | | | | | | | | | | Migrate the `git_filter_list_apply_*` functions over to using the new filter streams.
| * | | filters: introduce streaming filtersEdward Thomson2015-02-174-7/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #2820 from leoyanggit/mac_buildCarlos Martín Nieto2015-02-191-1/+2
|\ \ \ \ | |/ / / |/| | | Fix Mac build without OpenSSL
| * | | Fix Mac build without OpenSSLLeo Yang2015-02-171-1/+2
| |/ / | | | | | | | | | | | | | | | | | | If OpenSSL is disabled on Mac the SHA1 implementation goes to the CommonCrypto from the system. In this case we should not include the generic hash impl. Otherwise there would be duplicated impls which fail the build.
* | | Merge pull request #2909 from stewid/remove_extra_semicolonCarlos Martín Nieto2015-02-1622-24/+24
|\ \ \ | | | | | | | | Remove extra semicolon outside of a function
| * | | Remove extra semicolon outside of a functionStefan Widgren2015-02-1522-24/+24
|/ / / | | | | | | | | | | | | Without this change, compiling with gcc and pedantic generates warning: ISO C does not allow extra ‘;’ outside of a function.
* | | Merge pull request #2831 from ethomson/merge_lockCarlos Martín Nieto2015-02-1511-64/+332
|\ \ \ | | | | | | | | merge: lock index during the merge (not just checkout)
| * | | indexwriter: an indexwriter for repo operationsEdward Thomson2015-02-146-92/+79
| | | | | | | | | | | | | | | | | | | | Provide git_indexwriter_init_for_operation for the common locking pattern in merge, rebase, revert and cherry-pick.
| * | | merge-like operations: lock index while workingEdward Thomson2015-02-143-11/+67
| | | |
| * | | merge: lock the index at the start of the mergeEdward Thomson2015-02-142-2/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | checkout: introduce GIT_CHECKOUT_DONT_WRITE_INDEXEdward Thomson2015-02-143-2/+91
| | | |
| * | | git_indexwriter: lock then write the indexEdward Thomson2015-02-143-29/+100
| | | | | | | | | | | | | | | | | | | | | | | | Introduce `git_indexwriter`, to allow us to lock the index while performing additional operations, then complete the write (or abort, unlocking the index).
| * | | merge test: test an actual failure, not conflictEdward Thomson2015-02-131-6/+5
| |/ / | | | | | | | | | | | | | | | Correct the merge failed cleanup test. Merge data should not be cleaned up on conflicts, only on actual failure. And ORIG_HEAD should not be removed at all.
* | | Merge pull request #2895 from ethomson/alloc_overflowCarlos Martín Nieto2015-02-1557-296/+888
|\ \ \ | | | | | | | | allocations: test for overflow of requested size
| * | | pack-objects: unlock the cache on integer overflowEdward Thomson2015-02-131-4/+5
| | | |
| * | | buf test: cleanup memory leakEdward Thomson2015-02-131-0/+2
| | | |
| * | | integer overflow: use compiler intrinsics if supportedEdward Thomson2015-02-132-0/+20
| | | | | | | | | | | | | | | | | | | | gcc and clang support __builtin_add_overflow, use it whenever possible, falling back to our naive routines.
| * | | filebuf: use an int for return checkEdward Thomson2015-02-131-2/+2
| | | |
| * | | Make our overflow check look more like gcc/clang'sEdward Thomson2015-02-1336-347/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Update `khash.h` to pull request 42Edward Thomson2015-02-124-5/+11
| | | | | | | | | | | | | | | | | | | | https://github.com/attractivechaos/klib/pull/42/files introduces `kreallocarray`. Hook that up as our `git__reallocarray`.
| * | | khash: update to klib f28c067Edward Thomson2015-02-121-24/+33
| | | |
| * | | Introduce git__add_sizet_overflow and friendsEdward Thomson2015-02-124-32/+83
| | | | | | | | | | | | | | | | | | | | Add some helper functions to check for overflow in a type-specific manner.
| * | | p_read: ensure requested len is ssize_tEdward Thomson2015-02-123-1/+23
| | | | | | | | | | | | | | | | | | | | 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`.
| * | | Use `size_t` to hold size of arraysEdward Thomson2015-02-124-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | overflow checking: don't make callers set oomEdward Thomson2015-02-1212-43/+36
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | git_buf_grow_by: increase buf asize incrementallyEdward Thomson2015-02-127-15/+62
| | | | | | | | | | | | | | | | | | | | Introduce `git_buf_grow_by` to incrementally increase the size of a `git_buf`, performing an overflow calculation on the growth.
| * | | git__*allocarray: safer realloc and mallocEdward Thomson2015-02-127-23/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.)
| * | | odb__hashlink: check st.st_size before castingEdward Thomson2015-02-121-9/+9
| | | |
| * | | allocations: test for overflow of requested sizeEdward Thomson2015-02-1248-117/+528
| | | | | | | | | | | | | | | | | | | | Introduce some helper macros to test integer overflow from arithmetic and set error message appropriately.
* | | | Merge pull request #2903 from ethomson/rebaseCarlos Martín Nieto2015-02-154-20/+108
|\ \ \ \ | |_|/ / |/| | | Fixups for rebase
| * | | rebase: `CHECKOUT_SAFE` instead of `FORCE`Edward Thomson2015-02-131-8/+12
| | | | | | | | | | | | | | | | | | | | Switch to a standard branch-switching pattern of a `SAFE` checkout, then updating `HEAD`.
| * | | rebase: allow `NULL` branch to indicate `HEAD`Edward Thomson2015-02-133-3/+67
| | | | | | | | | | | | | | | | | | | | Don't require the branch to rebase, if given `NULL`, simply look up `HEAD`.
| * | | rebase: provide NULL `exec` on non-EXEC operationsEdward Thomson2015-02-132-9/+29
|/ / / | | | | | | | | | | | | Users may want to try to pay attention to the `exec` field on all rebase operations.
* | | Merge pull request #2901 from ethomson/win32_mode_bitsCarlos Martín Nieto2015-02-131-3/+11
|\ \ \ | | | | | | | | win32: limit the mode to `_wopen`/`_waccess`
| * | | win32: limit the mode to `_wopen`/`_waccess`Edward Thomson2015-02-131-3/+11
|/ / / | | | | | | | | | | | | | | | | | | | | | 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)
* | | Merge pull request #2883 from urkud/reget-reader-pointerCarlos Martín Nieto2015-02-132-0/+23
|\ \ \ | | | | | | | | Reinit `reader` pointer after reading included config file
| * | | Reinit `reader` pointer after reading included config fileYury G. Kudryashov2015-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Add test for include.path inside included configYury G. Kudryashov2015-02-131-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | It fails at least on my computer, though it may depend on some unpredictable factors (say, will realloc() extend the memory segment in place, or it will allocate new memory).
* | | | Merge pull request #2897 from leoyanggit/fix_fileop_warningCarlos Martín Nieto2015-02-131-1/+1
|\ \ \ \ | | | | | | | | | | Fix build warning on Android
| * | | | Fix build warning on AndroidLeo Yang2015-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge pull request #2899 from libgit2/jamill/rebase_opt_ver_checkEdward Thomson2015-02-121-1/+3
|\ \ \ \ \ | |_|_|/ / |/| | | | Check rebase options version on public entry points
| * | | | Check rebase options version on public entry pointsjamill/rebase_opt_ver_checkJameson Miller2015-02-121-1/+3
|/ / / /
* | | | Merge pull request #2866 from ethomson/checkout_perf2Carlos Martín Nieto2015-02-1220-129/+379
|\ \ \ \ | | | | | | | | | | Checkout performance
| * | | | remove some unused warningsEdward Thomson2015-02-042-3/+6
| | | | |
| * | | | checkout: hold seen dir paths in a mapEdward Thomson2015-02-043-49/+76
| | | | |
| * | | | attr_session: keep a temp bufferEdward Thomson2015-02-043-3/+9
| | | | |
| * | | | checkout: cache system attributes file locationEdward Thomson2015-02-043-17/+65
| | | | |
| * | | | attrcache: don't re-read attrs during checkoutEdward Thomson2015-02-0310-59/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During checkout, assume that the .gitattributes files aren't modified during the checkout. Instead, create an "attribute session" during checkout. Assume that attribute data read in the same checkout "session" hasn't been modified since the checkout started. (But allow subsequent checkouts to invalidate the cache.) Further, cache nonexistent git_attr_file data even when .gitattributes files are not found to prevent re-scanning for nonexistent files.
| * | | | tests: update for new test dataEdward Thomson2015-02-023-4/+5
| | | | |
| * | | | checkout test: ensure .gitattributes lifecycleEdward Thomson2015-02-025-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The .gitattributes cache should not reload .gitattributes in the middle of checking out, only between checkout operations. Otherwise, we'll spend all our time stat'ing and read'ing the gitattributes.