Re: [RFC/PATCH 1/4] tag: speed up --contains calculation
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 23, 2011, 15:51 UTC
- Message-ID
- <AANLkTinL-gN3sCkUzzsBbzwxo1AYx1NURjKaE8D4TgvU@mail.gmail.com>
- In-Reply-To
- <20100705123335.GA25699@sigill.intra.peff.net>
On Mon, Jul 5, 2010 at 14:33, Jeff King <peff@peff.net> wrote:
Show 5 quoted lines
> When we want to know if commit A contains commit B (or any > one of a set of commits, B through Z), we generally > calculate the merge bases and see if B is a merge base of A > (or for a set, if any of the commits B through Z have that > property).
On a work repo with around 10k tags after and before this patch:
$ time ~/g/git/git tag --contains HEAD~200 | wc -l
113 real 0m0.421s
user 0m0.380s
sys 0m0.042s $ time git tag --contains HEAD~200 | wc -l
113 real 2m18.861s
user 2m18.750s
sys 0m0.092sI'd love to have this merged downwards from pu. It's the single biggest usability improvement in my Git workflow for as long as I can remember.