summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* status: test submodules with mixed caseEdward Thomson2016-03-31230-0/+422
|
* Merge pull request #3716 from libgit2/cmn/typedef-sizetEdward Thomson2016-03-311-0/+8
|\ | | | | Add a no-op size_t typedef for the doc parser
| * Add a no-op size_t typedef for the doc parsercmn/typedef-sizetCarlos Martín Nieto2016-03-311-0/+8
| | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #3575 from pmq20/master-13jan16Carlos Martín Nieto2016-03-312-4/+0
|\ \ | | | | | | Remove duplicated calls to git_mwindow_close
| * | Remove duplicated calls to git_mwindow_closeP.S.V.R2016-01-132-4/+0
| | |
* | | Merge pull request #3715 from pks-t/pks/xprepare-memleakCarlos Martín Nieto2016-03-311-1/+2
|\ \ \ | |_|/ |/| | xprepare memleaks
| * | xdiff/xprepare: fix a memory leakPatrick Steinhardt2016-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
| * | xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bitsPatrick Steinhardt2016-03-311-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | Merge pull request #3712 from ethomson/config_duplicate_sectionCarlos Martín Nieto2016-03-292-4/+33
|\ \ | | | | | | config: don't write duplicate section
| * | config::write::repeated: init our bufferEdward Thomson2016-03-281-1/+1
| | |
| * | config: don't write section header if we're in itEdward Thomson2016-03-281-4/+9
| | | | | | | | | | | | | | | | | | 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.
| * | config: show we write a spurious duplicated section headerCarlos Martín Nieto2016-03-281-0/+24
| | | | | | | | | | | | | | | 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.
* | | Merge pull request #3703 from libgit2/cmn/multivar-set-lockedEdward Thomson2016-03-282-18/+1
|\ \ \ | |/ / |/| | config: don't special-case multivars that don't exist yet
| * | config: don't special-case multivars that don't exist yetcmn/multivar-set-lockedCarlos Martín Nieto2016-03-212-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #3708 from sschuberth/masterEdward Thomson2016-03-281-1/+3
|\ \ \ | | | | | | | | CMakeLists: Further improve the error messages regarding CMAKE_SIZEOF_VOID_P
| * | | CMakeLists: Further improve the error messages regarding CMAKE_SIZEOF_VOID_PSebastian Schuberth2016-03-241-1/+3
| | | |
* | | | Merge pull request #3691 from ethomson/iteratorsCarlos Martín Nieto2016-03-2624-4162/+6103
|\ \ \ \ | | | | | | | | | | Some FANTASTIC iterator refactoring
| * | | | iterator: comment fixedMarc Strapetz2016-03-241-2/+2
| | | | |
| * | | | iterator: unused includes removedMarc Strapetz2016-03-241-4/+0
| | | | |
| * | | | iterator: new workdir-iterator test for pathlist + includings treesMarc Strapetz2016-03-241-0/+26
| | | | |
| * | | | iterator: new index-iterator test for pathlist + includings treesMarc Strapetz2016-03-241-0/+31
| | | | |
| * | | | iterator: more pathlist-related tests should test actual pathsMarc Strapetz2016-03-242-6/+23
| | | | |
| * | | | iterator: cleanupsEdward Thomson2016-03-243-366/+54
| | | | | | | | | | | | | | | | | | | | Remove some unused functions, refactor some ugliness.
| * | | | iterator: don't run the gunk test by default on CIEdward Thomson2016-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | (It's slow!)
| * | | | iterator: refactor empty iterator to new styleEdward Thomson2016-03-241-15/+36
| | | | |
| * | | | iterator: mandate `advance_over`Edward Thomson2016-03-242-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Since the three iterators implement `advance_over` differently, mandate it and implement each.
| * | | | iterator: refactor index iteratorEdward Thomson2016-03-245-258/+882
| | | | |
| * | | | Introduce `git_path_common_dirlen`Edward Thomson2016-03-243-0/+46
| | | | |
| * | | | iterator: move the index into the iterator itselfEdward Thomson2016-03-242-36/+15
| | | | |
| * | | | iterator: give the tests a proper hierarchyEdward Thomson2016-03-247-3332/+3375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Added clar test for #3568Jeff Hostetler2016-03-231-0/+129
| | | | |
| * | | | diff: stop processing nitem when its removedEdward Thomson2016-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | When a directory is removed out from underneath us, stop trying to manipulate it.
| * | | | iterator: drop `advance_into_or_over`Edward Thomson2016-03-232-20/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | iterator: test that we can `advance_into` empty dirsEdward Thomson2016-03-231-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Failing test.joshaber2016-03-231-10/+53
| | | | |
| * | | | iterator: test pathlist handling for directoriesMarc Strapetz2016-03-232-0/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | iterator: test `advance_over` with a pathlistEdward Thomson2016-03-231-0/+60
| | | | |
| * | | | iterator: add tests for advance_overEdward Thomson2016-03-231-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | `git_iterator_advance_over` is a gnarly bit of code with no actual tests.
| * | | | iterator: test workdir pathlist with deep pathsEdward Thomson2016-03-231-0/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | iterator: workdir tests with submodulesEdward Thomson2016-03-231-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | Ensure that when specifying start/end paths, or pathlists, that we deal correctly with submodules.
| * | | | iterator: expand workdir tests with pathlistEdward Thomson2016-03-231-62/+224
| | | | | | | | | | | | | | | | | | | | | | | | | Expand the workdir tests to validate the paths in case sensitive and insensitive tests.
| * | | | iterator: test that we're at the end of iterationEdward Thomson2016-03-232-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.)
| * | | | iterator: combine fs+workdir iterators more completelyEdward Thomson2016-03-234-944/+1082
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | iterator: test fs iterator w/ many nested empty dirsEdward Thomson2016-03-231-0/+30
| | | | |
| * | | | iterator: skip unreadable directories in fs iteratorEdward Thomson2016-03-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Do not abort iteration in the middle when encountering an unreadable directory. Instead, skip it, as if it didn't exist.
| * | | | checkout: provide internal func to compute target pathEdward Thomson2016-03-231-32/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | iterators: refactored tree iteratorEdward Thomson2016-03-234-403/+634
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.)
| * | | | repo::iterator: don't go out of boundsEdward Thomson2016-03-231-2/+2
| | | | |
| * | | | git_object_dup: introduce typesafe versionsEdward Thomson2016-03-238-5/+59
| | | | |
| * | | | iterator: disambiguate reset and reset_rangeEdward Thomson2016-03-236-31/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.