Re: [PATCH] branch & tag: Add a --no-contains option

2017-03-10 Thread Ævar Arnfjörð Bjarmason
On Thu, Mar 9, 2017 at 3:55 PM, Jeff King wrote: > On Thu, Mar 09, 2017 at 03:52:09PM +0100, Ævar Arnfjörð Bjarmason wrote: > >> - filter->with_commit_tag_algo = 1; >> + if ((filter->merge_commit + filter->with_commit + >> filter->no_commit) > 1) >> +

Re: [PATCH] branch & tag: Add a --no-contains option

2017-03-09 Thread Jeff King
On Thu, Mar 09, 2017 at 03:52:09PM +0100, Ævar Arnfjörð Bjarmason wrote: > - filter->with_commit_tag_algo = 1; > + if ((filter->merge_commit + filter->with_commit + > filter->no_commit) > 1) > + filter->with_commit_tag_algo = 0; > + else > +

Re: [PATCH] branch & tag: Add a --no-contains option

2017-03-09 Thread Ævar Arnfjörð Bjarmason
On Thu, Mar 9, 2017 at 1:51 PM, Jeff King wrote: > On Thu, Mar 09, 2017 at 01:12:08PM +0100, Ævar Arnfjörð Bjarmason wrote: > >> > I'm almost certain this is because the contains_tag_algo one doesn't >> > clean up the flag bits it sets on the commit objects. So running it >> >

Re: [PATCH] branch & tag: Add a --no-contains option

2017-03-09 Thread Jeff King
On Thu, Mar 09, 2017 at 01:12:08PM +0100, Ævar Arnfjörð Bjarmason wrote: > > I'm almost certain this is because the contains_tag_algo one doesn't > > clean up the flag bits it sets on the commit objects. So running it > > twice in the same process is going to give you nonsense results. > > Yeah

Re: [PATCH] branch & tag: Add a --no-contains option

2017-03-09 Thread Ævar Arnfjörð Bjarmason
On Thu, Mar 9, 2017 at 11:46 AM, Jeff King wrote: > On Thu, Mar 09, 2017 at 11:41:59AM +0100, Ævar Arnfjörð Bjarmason wrote: > >> > I almost suggested that there simply be an option to invert the match >> > (like --invert-contains or something). But what you have here is more >> >

Re: [PATCH] branch & tag: Add a --no-contains option

2017-03-09 Thread Jeff King
On Thu, Mar 09, 2017 at 11:41:59AM +0100, Ævar Arnfjörð Bjarmason wrote: > > I almost suggested that there simply be an option to invert the match > > (like --invert-contains or something). But what you have here is more > > flexible, if somebody ever wanted to do: > > > > git tag --contains X

Re: [PATCH] branch & tag: Add a --no-contains option

2017-03-09 Thread Ævar Arnfjörð Bjarmason
On Thu, Mar 9, 2017 at 11:09 AM, Jeff King wrote: > On Wed, Mar 08, 2017 at 08:20:25PM +, Ævar Arnfjörð Bjarmason wrote: > >> Change the branch & tag commands to have a --no-contains option in >> addition to their longstanding --contains options. >> >> The use-case I have for

Re: [PATCH] branch & tag: Add a --no-contains option

2017-03-09 Thread Jeff King
On Wed, Mar 08, 2017 at 08:20:25PM +, Ævar Arnfjörð Bjarmason wrote: > Change the branch & tag commands to have a --no-contains option in > addition to their longstanding --contains options. > > The use-case I have for this is mainly to find the last-good rollout > tag given a known-bad .

Re: [PATCH] branch & tag: Add a --no-contains option

2017-03-08 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > More notes about this patch: > > * I'm not really happy with the "special attention" documentation >example in git-branch.txt, but it follows logically from the >description for --contains just above it which I think is overly >

[PATCH] branch & tag: Add a --no-contains option

2017-03-08 Thread Ævar Arnfjörð Bjarmason
Change the branch & tag commands to have a --no-contains option in addition to their longstanding --contains options. The use-case I have for this is mainly to find the last-good rollout tag given a known-bad . Right given a hypothetically bad commit v2.10.1-3-gcf5c7253e0 now you can find that