[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] RevSort#COMMIT_TIME_DESC confusion

On 03.11.2011 18:33, Marc Strapetz wrote:
> On 15.08.2011 17:59, Marc Strapetz wrote:
>> On 13.08.2011 21:05, Shawn Pearce wrote:
>>> On Sat, Aug 13, 2011 at 10:15, Marc Strapetz <marc.strapetz@xxxxxxxxxxx> wrote:
>>>>>> Should I keep them local to our project or submit as patch? In
>>>>>> latter case, any suggestions where to place that methods?
>>>>>
>>>>> Operations like `git branch --contains` need something like this. So
>>>>> we would appreciate a contribution to RevWalk or a new class in that
>>>>> same package that makes this operation easy in JGit.
> 
> I've now uploaded two patches addressing this issue:
> 
> http://egit.eclipse.org/r/#change,4537
> http://egit.eclipse.org/r/#change,4538
> 
> 4537 is the interesting one, which introduces a new queue extending
> DateRevQueue which discards commits that are ancestors of commits which
> are common to all start commits. The queue has to be installed for a
> RevWalk and thereby puts some restrictions on the configuration of the
> RevWalk. However, it may be combined with different Commit sorting,
> especially topological one. This opens up some more applications related
> to common ancestors: for instance, it helped me to speed up detection of
> pushable/mergable commits (git status' "diverged" commits).
> 
> The patches are working (at least for the tests), still they are more or
> less drafts. If this approach is a way to go, I'll continue to refine them.

As I just noticed, there are flaws in the algorithm when topological
order is not consistent with order by commit time. So for now I'd
primarily appreciate feedback regarding the approach using a custom
DateRevQueue.

--
Best regards,
Marc Strapetz
=============
syntevo GmbH
http://www.syntevo.com
http://blog.syntevo.com