Re: [ANNOUNCE] Git v2.19.0-rc0
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Aug 24, 2018, 02:48 UTC
- Message-ID
- <CA+P7+xpm-gsjCpPOZ=2z03Peb1Jb6axKo2nTp=UUpAFgWNureg@mail.gmail.com>
- In-Reply-To
- <20180824001643.GA14259@sigill.intra.peff.net>
On Thu, Aug 23, 2018 at 5:16 PM Jeff King <peff@peff.net> wrote:
Show 31 quoted lines
> > On Thu, Aug 23, 2018 at 08:06:37PM -0400, Jeff King wrote: > > > This almost works: > > > > @@ > > expression a, b; > > statement s; > > @@ > > - if (oidcmp(a, b)) s > > + if (!oideq(a, b)) s > > > > [...] > > > So I really do want some way of saying "all of the block, no matter what > > it is". Or of leaving it out as context. > > Aha. The magic invocation is: > > @@ > expression a, b; > statement s; > @@ > - if (oidcmp(a, b)) > + if (!oideq(a, b)) > s > > I would have expected that you could replace "s" with "...", but that > does not seem to work. > > -Peff
Odd...
What about..
- if (oidcmp(a,b))
+ if(!oideq(a,b))
{ ... }Or maybe you need to use something like
<... - if (oidcmp(a,b)) + if (!oideq(a,b)) ...>
Hmm. Yea, semantic patches are a bit confusing overall sometimes.
But it looks like you got something which works?
Thanks, Jake