summaryrefslogtreecommitdiff
path: root/tests/revwalk
Commit message (Collapse)AuthorAgeFilesLines
* oidarray: introduce `git_oidarray_dispose`ethomson/oidarray_disposeEdward Thomson2021-09-261-37/+37
| | | | | | Since users are disposing the _contents_ of the oidarray, not freeing the oidarray itself, the proper cleanup function is `git_oidarray_dispose`. Deprecate `git_oidarray_free`.
* stdint constants in test suiteCalvin Buckley2021-07-071-1/+1
| | | | | | | | | | Passes w/ gcc 11 on Fedora x64. Protip: So you don;t have to suffer, ``` perl -pe 's/(-?(?:0x)?[A-Fa-f0-9]+)([Uu])?[Ll][Ll]/\U$2INT64_C(\E$1)/mg' ```
* revwalk: fix memory leak in error handlingHeiko Voigt2019-05-101-0/+9
| | | | | This is not implemented and should fail, but it should also not leak. To allow the memory debugger to find leaks and fix this one we test this.
* git_revwalk_push_range: do not crash if range is missingHeiko Voigt2019-05-031-0/+9
| | | | | If someone passes just one ref (i.e. "master") and misses passing the range we should be nice and return an error code instead of crashing.
* Fix a bunch of warningslhchavez2019-01-051-1/+1
| | | | | | | | | | | This change fixes a bunch of warnings that were discovered by compiling with `clang -target=i386-pc-linux-gnu`. It turned out that the intrinsics were not necessarily being used in all platforms! Especially in GCC, since it does not support __has_builtin. Some more warnings were gleaned from the Windows build, but I stopped when I saw that some third-party dependencies (e.g. zlib) have warnings of their own, so we might never be able to enable -Werror there.
* object_type: use new enumeration namesethomson/index_fixesEdward Thomson2018-12-012-6/+6
| | | | Use the new object_type enumeration names within the codebase.
* revwalk: Allow changing hide_cbEivind Fonn2018-11-281-2/+29
| | | | | Since git_revwalk objects are encouraged to be reused, a public interface for changing hide_cb is desirable.
* Clear revwalk sorting when resettingNika Layzell2018-06-221-0/+25
| | | | | | | Currently we fail to clear the sorting flag for revwalks when resetting. This caused a poor interaction with the limited flag during a recent patch. This patch clears the revwalk sorting flag and causes it to no longer persist over resets.
* revwalk: fix uninteresting revs sometimes not limiting graphwalkPatrick Steinhardt2018-04-121-0/+27
| | | | | | | | | | | | | | | When we want to limit our graphwalk, we use the heuristic of checking whether the newest limiting (uninteresting) revision is newer than the oldest interesting revision. We do so by inspecting whether the first item's commit time of the user-supplied list of revisions is newer than the last added interesting revision. This is wrong though, as the user supplied list is in no way guaranteed to be sorted by increasing commit dates. This could lead us to abort the revwalk early before applying all relevant limiting revisions, outputting revisions which should in fact have been hidden. Fix the heuristic by instead checking whether _any_ of the limiting commits was made earlier than the last interesting commit. Add a test.
* testrepo: add new branchEdward Thomson2018-02-231-1/+1
| | | | | | Add a new branch to the `testrepo` repository, where the `README` file has changed to executable. This branch enables typechange tests between the new `executable` branch and `master`.
* Skip uninteresting commits in revwalk timesort iteratorAdam Niedzielski2017-03-091-0/+20
| | | | Fixes #4099
* tests: add merge-conflict branch for testrepoPatrick Steinhardt2017-02-131-1/+1
| | | | | Add a new branch that causes a merge conflict to `testrepo` so that we are able to test merging in worktrees.
* revwal: add failing test for walking with topo-sortAdam Niedzielski2017-02-021-0/+14
|
* revwalk: port over the topological sortingCarlos Martín Nieto2016-10-061-2/+2
| | | | | | | | | After porting over the commit hiding and selection we were still left with mistmaching output due to the topologial sort. This ports the topological sorting code to make us match with our equivalent of `--date-order` and `--topo-order` against the output from `rev-list`.
* revwalk: get closer to gitCarlos Martín Nieto2016-10-063-4/+7
| | | | | | | | | | | | We had some home-grown logic to figure out which objects to show during the revision walk, but it was rather inefficient, looking over the same list multiple times to figure out when we had run out of interesting commits. We now use the lists in a smarter way. We also introduce the slop mechanism to determine when to stpo looking. When we run out of interesting objects, we continue preparing the walk for another 5 rounds in order to make it less likely that we miss objects in situations with complex graphs.
* revwalk: introduce tests that hide old commitsEdward Thomson2016-10-061-0/+48
| | | | | | Introduce some tests that show some commits, while hiding some commits that have a timestamp older than the common ancestors of these two commits.
* merge: Fix memory leak in testvmg/redundantVicent Marti2015-11-021-0/+1
|
* Add test caseVicent Marti2015-11-021-0/+19
|
* tests: Fix warningsvmg/crudVicent Marti2015-10-211-1/+2
|
* signature: Strip crud just like Git doesVicent Marti2015-10-211-1/+1
|
* revwalk: make commit list use 64 bits for timecmn/quick-parse-64Carlos Martín Nieto2015-10-141-0/+35
| | | | | | | | 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.
* revwalk: add failing test for hiding and then pushing a commitCarlos Martín Nieto2015-04-081-0/+17
| | | | | When we hide a commit which we later push into the revwalk, we do not handle this well and return commits which we should not.
* tests: update for new test dataEdward Thomson2015-02-021-1/+1
|
* revwalk::mergebase test: free memoryEdward Thomson2014-10-261-0/+1
|
* Add git_merge_bases_many.Arthur Schreiber2014-10-091-2/+22
|
* Factor 40 and 41 constants from source.Ciro Santilli2014-09-161-4/+4
|
* Merge pull request #2481 from libgit2/cmn/oidarrayVicent Marti2014-08-291-0/+18
|\ | | | | merge: expose multiple merge bases
| * merge: expose multiple merge basescmn/oidarrayCarlos Martín Nieto2014-07-271-0/+18
| | | | | | | | | | | | | | | | We always calculate multiple merge bases, but up to now we had only exposed the "best" merge base. Introduce git_oidarray which analogously to git_strarray lets us return multiple ids.
* | Fix ahead-behind testsCarlos Martín Nieto2014-08-281-18/+18
|/ | | | | The logic was reversed. I have checked manually each pair with git and adjusted the expectation to what git status prints.
* revwalk::simplify test should testEdward Thomson2014-07-011-3/+3
| | | | | | The revwalk::simplify test was not actually tested the values from the revwalk against the expected. (Further, the expected had two IDs transposed.)
* Introduce cl_assert_equal_oidEdward Thomson2014-07-012-18/+12
|
* No need to find merge base.Anurag Gupta2014-03-311-4/+75
|
* Decorate unused params as unused in revwalk::hidecb testsEdward Thomson2014-03-261-0/+9
|
* Modified test for revwalk_hidecbAnurag Gupta2014-03-241-2/+2
|
* Conforming to libgit2 coding style.Anurag Gupta2014-03-241-3/+2
|
* Unit Tests for hide_cb in revwalkAnurag Gupta2014-03-241-0/+199
|
* Implement git_merge_base_octopusAimeast2014-03-181-1/+64
|
* Fix pqueue sort boundary condition bugRussell Belfer2014-03-121-0/+59
| | | | | | If the pqueue comparison fn returned just 0 or 1 (think "a<b") then the sort order of returned items could be wrong because there was a "< 0" that really needed to be "<= 0". Yikes!!!
* revwalk: add a test for pushing all referencesCarlos Martín Nieto2014-02-051-0/+19
| | | | This used to be broken, let's make sure we don't break this use-case.
* revwalk: ignore wrong object type in glob pushesCarlos Martín Nieto2014-02-051-1/+10
| | | | | Pushing a whole namespace can cause us to attempt to push non-committish objects. Catch this situation and special-case it for ignoring this.
* revwalk: add a failing test for pushing "tags"Carlos Martín Nieto2014-02-051-0/+10
| | | | This shows that pusing a whole namespace can be problematic.
* Rename tests-clar to testsBen Straub2013-11-144-0/+748