On 4/18/2018 6:15 PM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:

The containment algorithm for 'git branch --contains' is different
from that for 'git tag --contains' in that it uses is_descendant_of()
instead of contains_tag_algo(). The expensive portion of the branch
algorithm is computing merge bases.

When a commit-graph file exists with generation numbers computed,
we can avoid this merge-base calculation when the target commit has
a larger generation number than the target commits.
You have "target" twice in above paragraph; one of those should probably
be something else.

Thanks. Second "target" should be "initial".

[...]
+
+       if (commit->generation > min_generation)
+               return 0;
Why not use "return ret;" instead of "return 0;", like the rest of the
code [cryptically] does, that is:

   +    if (commit->generation > min_generation)
   +            return ret;

Sure.

Thanks,
-Stolee

Reply via email to