Commit Graph

16 Commits

Author SHA1 Message Date
Adam Niedzielski
c11c08a552 Skip uninteresting commits in revwalk timesort iterator
Fixes #4099
2017-03-09 14:01:10 +01:00
Patrick Steinhardt
8acc3b16ef tests: add merge-conflict branch for testrepo
Add a new branch that causes a merge conflict to `testrepo` so
that we are able to test merging in worktrees.
2017-02-13 10:13:02 +01:00
Adam Niedzielski
390431c322 revwal: add failing test for walking with topo-sort 2017-02-02 16:01:37 +01:00
Carlos Martín Nieto
6708618c10 revwalk: get closer to git
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.
2016-10-06 11:04:55 +02:00
Edward Thomson
565fb8dcd4 revwalk: introduce tests that hide old commits
Introduce some tests that show some commits, while hiding some commits
that have a timestamp older than the common ancestors of these two
commits.
2016-10-06 11:04:55 +02:00
Vicent Marti
bbe1957b8c tests: Fix warnings 2015-10-21 12:09:29 +02:00
Carlos Martín Nieto
5ffdea6f65 revwalk: make commit list use 64 bits for time
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.
2015-10-14 16:54:13 +02:00
Carlos Martín Nieto
5a503fffbc revwalk: add failing test for hiding and then pushing a commit
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.
2015-04-08 23:42:36 +02:00
Edward Thomson
60561d5446 tests: update for new test data 2015-02-02 22:46:43 -05:00
Ciro Santilli
3b2cb2c91e Factor 40 and 41 constants from source. 2014-09-16 13:07:04 +02:00
Anurag Gupta
3bc3d79761 No need to find merge base. 2014-03-31 15:15:32 -07:00
Russell Belfer
5302a88538 Fix pqueue sort boundary condition bug
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!!!
2014-03-12 11:21:55 -07:00
Carlos Martín Nieto
d18209eef9 revwalk: add a test for pushing all references
This used to be broken, let's make sure we don't break this use-case.
2014-02-05 12:16:44 +01:00
Carlos Martín Nieto
d465e4e980 revwalk: ignore wrong object type in glob pushes
Pushing a whole namespace can cause us to attempt to push non-committish
objects. Catch this situation and special-case it for ignoring this.
2014-02-05 12:16:44 +01:00
Carlos Martín Nieto
b4ef67d5eb revwalk: add a failing test for pushing "tags"
This shows that pusing a whole namespace can be problematic.
2014-02-05 12:16:37 +01:00
Ben Straub
1782038144 Rename tests-clar to tests 2013-11-14 14:05:52 -08:00