summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* merge: Do not mallocz unecessary entriesvmg/poolVicent Marti2015-10-281-2/+2
|
* pool: update commentVicent Marti2015-10-281-1/+1
|
* pool: Dot not assume mallocs are zeroed outVicent Marti2015-10-284-24/+23
|
* pool: Take into account malloc overhead & pool page sizeVicent Marti2015-10-281-1/+2
|
* repository: plug memory leakVicent Marti2015-10-281-0/+1
| | | | cc @carlosmn
* pool: Simplify implementationVicent Marti2015-10-2816-265/+72
|
* merge: Plug memory leakvmg/reuc-insertVicent Marti2015-10-271-3/+3
|
* merge: Implement `GIT_MERGE_TREE_SKIP_REUC`Vicent Marti2015-10-271-28/+43
|
* reuc: Be smarter when inserting new REUC entriesVicent Marti2015-10-271-19/+16
| | | | | | | | | | 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.
* Merge pull request #3481 from ethomson/xdiff_includeCarlos Martín Nieto2015-10-231-1/+1
|\ | | | | xdiff: reference util.h in parent directory
| * xdiff: reference util.h in parent directoryEdward Thomson2015-10-221-1/+1
| | | | | | | | | | | | 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.
* | merge: add GIT_MERGE_TREE_FAIL_ON_CONFLICTEdward Thomson2015-10-221-1/+8
| | | | | | | | | | | | Provide a new merge option, GIT_MERGE_TREE_FAIL_ON_CONFLICT, which will stop on the first conflict and fail the merge operation with GIT_EMERGECONFLICT.
* | Merge pull request #3480 from ethomson/nsecsCarlos Martín Nieto2015-10-221-1/+3
|\ \ | | | | | | Nanoseconds in the index: ignore for diffing
| * | diff: ignore nsecs when diffingEdward Thomson2015-10-221-1/+3
| |/ | | | | | | | | | | | | | | | | 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.
* | Merge pull request #3475 from libgit2/cmn/programdata-configEdward Thomson2015-10-217-5/+64
|\ \ | |/ |/| config: add a ProgramData level
| * config: add a ProgramData levelcmn/programdata-configCarlos Martín Nieto2015-10-217-5/+64
| | | | | | | | | | This is where portable git stores the global configuration which we can use to adhere to it even though git isn't quite installed on the system.
* | index: Remove unneeded constsVicent Marti2015-10-211-3/+3
| |
* | signature: Strip crud just like Git doesVicent Marti2015-10-211-2/+16
|/
* Merge pull request #3466 from libgit2/cmn/quick-parse-64Edward Thomson2015-10-152-4/+4
|\ | | | | revwalk: make commit list use 64 bits for time
| * 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.
* | Merge pull request #3444 from ethomson/add_preserves_conflict_modeCarlos Martín Nieto2015-10-151-15/+62
|\ \ | | | | | | Preserve modes from a conflict in `git_index_insert`
| * | index: also try conflict mode when insertingEdward Thomson2015-09-301-15/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | odb: Prioritize alternate backendsvmg/odb-lookupsVicent Marti2015-10-141-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | odb: Be smarter when refreshing backendsVicent Marti2015-10-142-154/+159
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | 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
| | |