Skip to content
This repository was archived by the owner on May 12, 2018. It is now read-only.

Conversation

mr-vinn
Copy link
Contributor

@mr-vinn mr-vinn commented Oct 11, 2014

When native git log is called with a pathspec, it only includes commits that are not TREESAME to any parent (TREESAME means that pathspec is not modified between the commit and its parent). If more than one parent is TREESAME to the commit, native git only follows the first one. Repository#log now implements these history simplification rules.

When native `git log` is called with a pathspec, it only includes commits that
are not TREESAME to any parent (TREESAME means that pathspec is not modified
between the commit and its parent).  If more than one parent is TREESAME to the
commit, native git only follows the first one.  `Repository#log` now implements
these history simplification rules.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.14%) when pulling f0d61a9 on mr-vinn:log-correctness into cba8de9 on gitlabhq:master.

@dosire
Copy link
Member

dosire commented Oct 13, 2014

/cc @randx

@dzaporozhets
Copy link
Contributor

@mr-vinn does it affects performance in any way?

@mr-vinn
Copy link
Contributor Author

mr-vinn commented Oct 13, 2014

It's about 40% faster on the simple benchmark from #49, using the GitLab CE repo. Probably because it doesn't examine as many commits thanks to the rule about only following one treesame parent.

Old

Repository#log with options: {:limit=>0, :path=>"public", :follow=>false}

       user     system      total        real
   0.790000   0.190000   0.980000 (  0.985883)

Found 69 commits

New

Repository#log with options: {:limit=>0, :path=>"public", :follow=>false}

       user     system      total        real
   0.460000   0.130000   0.590000 (  0.589126)

Found 28 commits

dzaporozhets added a commit that referenced this pull request Oct 28, 2014
Implement `git log` history simplification
@dzaporozhets dzaporozhets merged commit 4721e06 into gitlabhq:master Oct 28, 2014
@dzaporozhets
Copy link
Contributor

ok cool!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants