Re: [PATCH v3 06/11] diff: rename struct diff_filespec's sha1_valid member
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Jun 25, 2016, 00:52 UTC
- Message-ID
- <20160625005235.GB7035@vauxhall.crustytoothpaste.net>
- In-Reply-To
- <xmqqfus2dsbl.fsf@gitster.mtv.corp.google.com>
On Fri, Jun 24, 2016 at 05:29:18PM -0700, Junio C Hamano wrote:
Show 19 quoted lines
> "brian m. carlson" <sandals@crustytoothpaste.net> writes: > > > > @@ > > struct diff_filespec o; > > @@ > > - o.sha1_valid > > + o.oid_valid > > > > @@ > > struct diff_filespec *p; > > @@ > > - p->sha1_valid > > + p->oid_valid > > Totally offtopic (from Git's point of view), but why does Coccinelle > need both of these? I recall that between v1 and v2 there were some > confusing discussions about the order of these equivalent conversions > mattering and the tool producing an incorrect conversion in v1.
As I understand it, Coccinelle doesn't transform . into ->. Granted, the latter is a special case of the former, but it might break workflows where you're trying to convert an inline struct to a pointer to struct or such. It errs on the side of you being more explicit to allow more flexibility in usage.
-- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204