Re: [PATCH v19 5/7] branch: add --delete-merged <branch>
Junio C Hamano <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
Harald Nordgren <[email protected]> writes: > I think I can fix this with > > ``` > -+ if (strset_contains(data->deletable, ref->name)) > ++ if (strset_contains(data->deletable, ref->name) || > ++ strset_contains(data->spared, ref->name)) > ``` > > I used your example to write a test about it as well. > > > Harald I do not claim that the single example I gave covers all the issues that arise from failing to analyze the dependency graph, or from attempting to solve the problem sequentially, which makes the solution depend on the order in which branches are visited. I have a suspicion that it may be unavoidable to employ a multi-pass approach that iteratively identifies all branches transitively needed by any surviving branch, though that is merely a hunch, unsupported by any proof. Thanks.