Re: limiting git branch --contains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/24/2023 2:15 PM, Oswald Buddenhagen wrote:
> On Fri, Mar 24, 2023 at 01:23:32PM -0400, Derrick Stolee wrote:
>> Could you make sure to run 'git commit-graph write --reachable' before
>> testing again?
>>
> i did, didn't help.
> 
> but regardless, even if this would improve things by an order of magnitude (or even two), it would be still wasteful, given that the expected working set contains a few tens commits, while the whole graph contains well over a million commits.

Hm. The point is that it _should_ improve things by several orders
of magnitude by using generation numbers to avoid walking a
significant portion of the commits. That is, unless the commit is
extremely old.

But what you were originally asking was also about filtering the
set of branches to pick, instead of just the commits that are
walked.

In that case, perhaps you should use 

  git for-each-ref --format="%(refname)" --contains=<oid> <ref1> <ref2> ... <refN>

or use ref patterns instead of exact refs, if you have such a
grouping?

Thanks,
-Stolee



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux