Log

Author Commit Date CI Message
Edward Thomson 95fbc81d 2016-04-19T15:24:14 Merge pull request #3745 from libgit2/cmn/ignore-starstar Improve star-star matching
Carlos Martín Nieto d45928cc 2016-04-18T16:05:12 ignore: move star-star matching closer to it use Instead of threading the state down to the larger loop, let's have the loop where we detect the double star so each of them are easier to read.
Carlos Martín Nieto 1c3018eb 2016-04-18T13:34:18 ignore: fix directory limits when searching for star-star In order to match the star-star, we disable the flag that's looking for a single path element, but that leads to searching for the pattern in the middle of elements in the input string. Mark when we're handing a star-star so we jump over the elements in our attempt to match the part of the pattern that comes after the star-star. While here, tighten up the check so we don't allow invalid rules through.
Antonio Scandurra 0f362716 2016-03-31T17:38:40 Add more tests for path matching with globs and path delimiters
Carlos Martín Nieto 029c9346 2016-04-13T11:51:05 Merge pull request #3740 from Qix-/patch-1 Add missing ')' to callbacks documentation
Josh Junon fc15befd 2016-04-12T21:50:18 Add missing ')' to callbacks documentation Super minor, but it was bugging me. There was a missing closing paren in the docs.
Carlos Martín Nieto a2d3d2d3 2016-04-12T00:14:00 Merge pull request #3738 from ethomson/test_as_root tests: skip the unreadable file tests as root
Edward Thomson bbd65ad2 2016-04-11T13:39:31 tests: skip the unreadable file tests as root When running as root, skip the unreadable file tests, because, well, they're probably _not_ unreadable to root unless you've got some crazy NSA clearance-level honoring operating system shit going on.
Edward Thomson 0e00eecf 2016-04-11T13:29:54 Merge pull request #3736 from libgit2/cmn/dwim-general-message refs: provide a more general error message for dwim
Carlos Martín Nieto b93b74b9 2016-04-11T19:24:47 Merge pull request #3737 from ethomson/strict-object Strict object creation in `refs::create`
Edward Thomson d22a8b95 2016-04-11T11:50:11 refs::create: strict object creation on by default When we turned strict object creation validation on by default, we forgot to inform the refs::create tests of this. They, in fact, believed that strict object creation was off by default. As a result, their cleanup function went and turned strict object creation off for the remaining tests.
Carlos Martín Nieto 6d22ef7a 2016-04-11T11:37:02 reset: use real ids for the tests This lets us run with strict object creation on.
Carlos Martín Nieto 77965c68 2016-04-11T17:43:07 refs: provide a more general error message for dwim If we cannot dwim the input, set the error message to be explicit about that. Otherwise we leave the error for the last failed lookup, which can be rather unexpected as it mentions a remote when the user thought they were trying to look up a branch.
Edward Thomson 69723dd8 2016-04-06T15:59:31 Merge pull request #3730 from andhe/fix-stream-test tests: fix core/stream test when built with openssl off
Andreas Henriksson 04f47a43 2016-04-06T10:37:30 tests: fix core/stream test when built with openssl off When passing -DUSE_OPENSSL:BOOL=OFF to cmake the testsuite will fail with the following error: core::stream::register_tls [/tmp/libgit2/tests/core/stream.c:40] Function call failed: (error) error -1 - <no message> Fix test to assume failure for tls when built without openssl. While at it also fix GIT_WIN32 cpp to check if it's defined or not.
Edward Thomson 54cfee6d 2016-04-05T14:47:02 Merge pull request #3728 from libgit2/cmn/no-embed Remove Makefile.embed
Carlos Martín Nieto 21ba3461 2016-04-05T13:25:23 Remove Makefile.embed This has not been a supported build mode for quite some time, and it correspondingly hasn't worked to build the library for a long time. Get rid of it, as the only build mode we support is though CMakek.
Carlos Martín Nieto 381caf56 2016-04-02T22:19:42 Merge pull request #3724 from ethomson/submodule_start_supports_silly_slashes iterator/diff: allow trailing `/` on start/end paths to match submodules
Edward Thomson 7018e3b7 2016-04-02T16:52:53 Merge pull request #3723 from libgit2/cmn/ignore-symlink ignore: don't use realpath to canonicalize path
Edward Thomson d47f7e1c 2016-04-02T13:03:09 iterator: support trailing `/` in start for submod Allow callers to specify a start path with a trailing slash to match a submodule, instead of just a directory. This is for some legacy behavior that's sort of dumb, but there it is.
Edward Thomson 2e0391f4 2016-04-02T11:33:00 diff: test submodules are found with trailing `/` Test that submodules are found when the are included in a pathspec but have a trailing slash.
Carlos Martín Nieto d364dc8b 2016-04-01T14:33:42 ignore: don't use realpath to canonicalize path If we're looking for a symlink, realpath will give us the resolved path, which is not what we're after, but a canonicalized version of the path the user asked for.
Carlos Martín Nieto 36fc2557 2016-04-01T04:09:50 Merge pull request #3720 from pks-t/pks/merge-driver-memleaks merge_driver: fix missing `goto done;`
Patrick Steinhardt 83c93a7c 2016-04-01T09:37:55 merge_driver: fix missing `goto done;` The code initializing the merge driver registry accidentally forgot a `goto done` in case of an error. Because of this the next line, which registers the global shutdown callback for the merge drivers, is only called when an error occured. Fix this by adding the missing `goto done`. This fixes some memory leaks when the global state is shut down.
Carlos Martín Nieto 1cac688d 2016-04-01T00:29:51 Merge pull request #3719 from libgit2/ethomson/submodule_status WD iterator: properly identify submodules
Edward Thomson 4df6ddaa 2016-03-31T15:05:34 iterator: use correct search function
Edward Thomson 74ab5f2c 2016-03-31T17:33:44 status: test submodules with mixed case
Carlos Martín Nieto 24ecf18e 2016-03-31T14:04:43 Merge pull request #3717 from libgit2/ethomson/leaks Plug some leaks
Edward Thomson c4aa5c04 2016-03-31T10:43:57 leaks: call `xdl_free_classifier`
Carlos Martín Nieto f5c874a4 2016-03-29T14:47:31 Plug a few leaks
Edward Thomson 17442b28 2016-03-30T17:47:05 leaks: fix some leaks in the tests
Edward Thomson 97054833 2016-03-30T17:41:08 leaks: fix some iterator leaks
Edward Thomson 1694a639 2016-03-31T10:04:43 Merge pull request #3716 from libgit2/cmn/typedef-sizet Add a no-op size_t typedef for the doc parser
Carlos Martín Nieto d53cc13e 2016-03-31T04:12:46 Merge pull request #3575 from pmq20/master-13jan16 Remove duplicated calls to git_mwindow_close
Carlos Martín Nieto bd4ef337 2016-03-31T03:50:11 Merge pull request #3715 from pks-t/pks/xprepare-memleak xprepare memleaks
Carlos Martín Nieto 98444536 2016-03-31T11:35:53 Add a no-op size_t typedef for the doc parser Clang's documentation parser, which we use in our documentation system does not report any comments for functions which use size_t as a type. The root cause is buried somewhere in libclang but we can work around it by defining the type ourselves. This typedef makes sure that libclang sees it and that we do not change its size.
Patrick Steinhardt 6045afd3 2016-03-31T11:32:36 xdiff/xprepare: fix a memory leak The xdl_prepare_env() function may initialise an xdlclassifier_t data structure via xdl_init_classifier(), which allocates memory to several fields, for example 'rchash', 'rcrecs' and 'ncha'. If this function later exits due to the failure of xdl_optimize_ctxs(), then this xdlclassifier_t structure, and the memory allocated to it, is not cleaned up. In order to fix the memory leak, insert a call to xdl_free_classifier() before returning. This patch was originally written by Ramsay Jones (see commit 87f16258367a3b9a62663b11f898a4a6f3c19d31 in git.git).
Patrick Steinhardt 1bce1487 2016-03-31T11:30:31 xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits Commit 307ab20b3 ("xdiff: PATIENCE/HISTOGRAM are not independent option bits", 19-02-2012) introduced the XDF_DIFF_ALG() macro to access the flag bits used to represent the diff algorithm requested. In addition, code which had used explicit manipulation of the flag bits was changed to use the macros. However, one example of direct manipulation remains. Update this code to use the XDF_DIFF_ALG() macro. This patch was originally written by Ramsay Jones (see commit 5cd6978a9cfef58de061a9525f3678ade479564d in git.git).
Carlos Martín Nieto 2f0450f4 2016-03-29T03:26:43 Merge pull request #3712 from ethomson/config_duplicate_section config: don't write duplicate section
Edward Thomson b085ecbe 2016-03-28T13:51:21 Merge pull request #3703 from libgit2/cmn/multivar-set-locked config: don't special-case multivars that don't exist yet
Edward Thomson 76e1a679 2016-03-28T08:56:13 config::write::repeated: init our buffer
Edward Thomson e25e1ca1 2016-03-28T11:13:51 config: don't write section header if we're in it If we hit the EOF while trying to write a new value, it may be that we're already in the section that we were looking for. If so, do not write a (duplicate) section header, just write the value.
Carlos Martín Nieto 3e95bd36 2016-03-04T14:51:16 config: show we write a spurious duplicated section header We should notice that we are in the correct section to add. This is a cosmetic bug, since replacing any of these settings does work.
Edward Thomson e89abec6 2016-03-28T09:50:31 Merge pull request #3708 from sschuberth/master CMakeLists: Further improve the error messages regarding CMAKE_SIZEOF_VOID_P
Carlos Martín Nieto 7b29be31 2016-03-26T05:39:07 Merge pull request #3691 from ethomson/iterators Some FANTASTIC iterator refactoring
Marc Strapetz d6713ec6 2016-03-22T10:30:07 iterator: comment fixed
Marc Strapetz f4777058 2016-03-22T10:29:41 iterator: unused includes removed
Marc Strapetz c017c183 2016-03-22T10:29:12 iterator: new workdir-iterator test for pathlist + includings trees
Marc Strapetz 09064f15 2016-03-22T10:28:50 iterator: new index-iterator test for pathlist + includings trees
Marc Strapetz 8152a748 2016-03-22T10:27:50 iterator: more pathlist-related tests should test actual paths
Edward Thomson 9eb9e5fa 2016-03-21T17:19:24 iterator: cleanups Remove some unused functions, refactor some ugliness.
Edward Thomson d712c2b2 2016-03-21T18:30:21 iterator: don't run the gunk test by default on CI (It's slow!)
Edward Thomson 35877463 2016-03-21T17:03:00 iterator: refactor empty iterator to new style
Edward Thomson 247e3b43 2016-03-21T16:51:45 iterator: mandate `advance_over` Since the three iterators implement `advance_over` differently, mandate it and implement each.
Edward Thomson 0ef0b71c 2016-03-21T12:54:47 iterator: refactor index iterator
Edward Thomson ba6f86eb 2016-03-18T17:33:46 Introduce `git_path_common_dirlen`
Edward Thomson 82a1aab6 2016-03-18T12:59:35 iterator: move the index into the iterator itself
Edward Thomson de034cd2 2016-03-18T10:59:38 iterator: give the tests a proper hierarchy Iterator tests were split over repo::iterator and diff::iterator, with duplication between the two. Move them to iterator::index, iterator::tree, and iterator::workdir.
Carlos Martín Nieto d4763c98 2016-03-24T06:56:25 Merge pull request #3574 from chescock/buffer-sideband-pack-data Buffer sideband packet data
Sebastian Schuberth 035430b7 2016-03-24T14:10:29 CMakeLists: Further improve the error messages regarding CMAKE_SIZEOF_VOID_P
Edward Thomson 6cd9573f 2016-03-17T15:09:38 iterator: test that we can `advance_into` empty dirs Prior iterator implementations returned `GIT_ENOTFOUND` when trying to advance into empty directories. Ensure that we no longer do that and simply handle them gracefully.
joshaber b6204260 2016-02-10T13:46:14 Failing test.
Jeff Hostetler df25daef 2016-01-04T12:12:24 Added clar test for #3568
Edward Thomson 67885532 2016-03-17T15:29:21 diff: stop processing nitem when its removed When a directory is removed out from underneath us, stop trying to manipulate it.
Edward Thomson 0a2e1032 2016-03-17T15:19:45 iterator: drop `advance_into_or_over` Now that iterators do not return `GIT_ENOTFOUND` when advancing into an empty directory, we do not need a special `advance_into_or_over` function.
Marc Strapetz ae86aa5a 2016-03-16T11:38:02 iterator: test pathlist handling for directories tree_iterator was only working properly for a pathlist containing file paths. In case of directory paths, it didn't match children which contradicts GIT_DIFF_DISABLE_PATHSPEC_MATCH and is different from index_iterator and fs_iterator. As a consequence head-to-index status reporting for a specific directory did not work properly -- all files have been reported as added. Include additional tests.
Edward Thomson 6bcddf88 2016-03-16T17:14:36 iterator: test `advance_over` with a pathlist
Edward Thomson 9fb2527f 2016-03-16T16:29:38 iterator: add tests for advance_over `git_iterator_advance_over` is a gnarly bit of code with no actual tests.
Edward Thomson 85541f43 2016-03-16T13:31:35 iterator: test workdir pathlist with deep paths In the workdir iterator we do some tricky things to step down into directories to look for things that are in our pathlist. Make sure that we don't confuse between folders that we're definitely going to return everything in and folders that we're only stepping down into to keep looking for matches.
Edward Thomson 908d8de8 2016-03-16T12:15:55 iterator: workdir tests with submodules Ensure that when specifying start/end paths, or pathlists, that we deal correctly with submodules.
Edward Thomson c3d195f1 2016-03-16T11:45:44 iterator: expand workdir tests with pathlist Expand the workdir tests to validate the paths in case sensitive and insensitive tests.
Edward Thomson 4c88198a 2016-03-16T10:17:20 iterator: test that we're at the end of iteration Ensure that we have hit the end of iteration; previously we tested that we saw all the values that we expected to see. We did not then ensure that we were at the end of the iteration (and that there were subsequently values in the iteration that we did *not* expect.)
Edward Thomson 0e0589fc 2016-03-10T00:04:26 iterator: combine fs+workdir iterators more completely Drop some of the layers of indirection between the workdir and the filesystem iterators. This makes the code a little bit easier to follow, and reduces the number of unnecessary allocations a bit as well. (Prior to this, when we filter entries, we would allocate them, filter them and then free them; now we do the filtering before allocation.) Also, rename `git_iterator_advance_over_with_status` to just `git_iterator_advance_over`. Mostly because it's a fucking long-ass function name otherwise.
Edward Thomson d051de24 2016-03-10T12:54:33 iterator: test fs iterator w/ many nested empty dirs
Edward Thomson a4f520a6 2016-03-10T11:07:13 iterator: skip unreadable directories in fs iterator Do not abort iteration in the middle when encountering an unreadable directory. Instead, skip it, as if it didn't exist.
Edward Thomson 702b23d7 2016-03-11T11:27:58 checkout: provide internal func to compute target path Many code paths in checkout need the final, full on-disk path of the file they're writing. (No surprise). However, they all munge the `data->path` buffer themselves to get there. Provide a nice helper method for them. Plus, drop the use `git_iterator_current_workdir_path` which does the same thing but different. Checkout is the only caller of this silly function, which lets us remove it.
Edward Thomson be30387e 2016-02-25T16:05:18 iterators: refactored tree iterator Refactored the tree iterator to never recurse; simply process the next entry in order in `advance`. Additionally, reduce the number of allocations and sorting as much as possible to provide a ~30% speedup on case-sensitive iteration. (The gains for case-insensitive iteration are less majestic.)
Edward Thomson 277c85eb 2016-03-02T15:38:13 repo::iterator: don't go out of bounds
Edward Thomson f0224772 2016-02-17T18:04:19 git_object_dup: introduce typesafe versions
Edward Thomson 684b35c4 2016-02-25T15:11:14 iterator: disambiguate reset and reset_range Disambiguate the reset and reset_range functions. Now reset_range with a NULL path will clear the start or end; reset will leave the existing start and end unchanged.
Edward Thomson ac05086c 2016-02-25T14:51:23 iterator: drop unused/unimplemented `seek`
Edward Thomson 8a5a2e2f 2016-03-17T00:47:50 status: update test to include valid OID
Edward Thomson 63f7b7f9 2016-03-23T13:14:04 Merge pull request #3707 from sschuberth/master CMakeLists: Show the pointer size for an unsupported architecture
Sebastian Schuberth f9601e6f 2016-03-23T20:37:39 CMakeLists: Show the pointer size for an unsupported architecture Showing the pointer size gives a hint as to why we think this is an unsupported architecture.
Carlos Martín Nieto 1a2d8bd3 2016-03-23T16:51:52 array: fix search for empty arrays When the array is empty `cmp` never gets set by the comparison function. Initialize it so we return ENOTFOUND in those cases.
Carlos Martín Nieto 661db4f4 2016-03-23T03:45:53 Merge pull request #3704 from ethomson/tree-reuse tree: drop the now-unnecessary entries vector
Carlos Martín Nieto 0a7ce499 2016-03-22T14:34:35 Merge pull request #3502 from libgit2/cmn/createblob-stream Add ability to write a filtered blob through a stream
Carlos Martín Nieto 6669e3e8 2015-11-08T04:28:08 blob: remove _fromchunks() The callback mechanism makes it awkward to write data from an IO source; move to `_fromstream()` which lets the caller remain in control, in the same vein as we prefer iterators over foreach callbacks.
Carlos Martín Nieto e2bb9ed3 2015-11-04T10:39:55 CHANGELOG: add a note about _fromstream() and _fromstream_commit()
Carlos Martín Nieto 35e68606 2015-11-04T10:36:50 blob: fix fromchunks iteration counter By returning when the count goes to zero rather than below it, setting `howmany` to 7 in fact writes out the string 6 times. Correct the termination condition to write out the string the amount of times we specify.
Carlos Martín Nieto 0a5c6028 2015-11-04T10:30:48 blob: introduce creating a blob by writing into a stream The pair of `git_blob_create_frombuffer()` and `git_blob_create_frombuffer_commit()` is meant to replace `git_blob_create_fromchunks()` by providing a way for a user to write a new blob when they want filtering or they do not know the size. This approach allows the caller to retain control over when to add data to this buffer and a more natural fit into higher-level language's own stream abstractions instead of having to handle IO wait in the callback. The in-memory buffer size of 2MB is chosen somewhat arbitrarily to be a round multiple of usual page sizes and a value where most blobs seem likely to be either going to be way below or way over that size. It's also a round number of pages. This implementation re-uses the helper we have from `_fromchunks()` so we end up writing everything to disk, but hopefully more efficiently than with a default filebuf. A later optimisation can be to avoid writing the in-memory contents to disk, with some extra complexity.
Carlos Martín Nieto 3fa764ed 2015-11-04T09:20:14 filebuf: allow using a custom buffer size Allow setting the buffer size on open in order to use this data structure more generally as a spill buffer, with larger buffer sizes for specific use-cases.
Edward Thomson e2e4bae9 2016-03-22T00:18:44 tree: drop the now-unnecessary entries vector Remove the now-unnecessary entries vector. Add `git_array_search` to binary search through an array to accomplish this.
Carlos Martín Nieto e50a49ee 2016-03-22T01:54:49 Merge pull request #3559 from yongthecoder/master Add a sanity check in git_indexer_commit to avoid subtraction overflow.
Carlos Martín Nieto cec320fe 2016-03-22T00:44:05 Merge pull request #3701 from jfultz/fix-0.24.0-changelog Fix some errors I found in the changelog for 0.24.0
Edward Thomson 7adca53e 2016-03-21T21:29:33 Merge pull request #3702 from libgit2/cmn/tree-reuse Reuse a tree's buffer and allocate constant-sized entries in an array
Carlos Martín Nieto 6f09911c 2016-03-21T21:10:26 config: don't special-case multivars that don't exist yet This special-casing ignores that we might have a locked file, so the hashtable does not represent the contents of the file we want to write. This causes multivar writes to overwrite entries instead of add to them when under lock. There is no need for this as the normal code-path will write to the file just fine, so simply get rid of it.
Carlos Martín Nieto 4ed9e939 2016-03-20T12:01:45 tree: store the entries in a growable array Take advantage of the constant size of tree-owned arrays and store them in an array instead of a pool. This still lets us free them all at once but lets the system allocator do the work of fitting them in.
Carlos Martín Nieto 60a194aa 2016-03-20T11:00:12 tree: re-use the id and filename in the odb object Instead of copying over the data into the individual entries, point to the originals, which are already in a format we can use.
Carlos Martin Nieto a177756b 2016-03-18T13:00:27 win32: free thread-local data on thread exit