Re: [PATCH v2 0/8] object_id part 4
From: Jeff King <hidden>
Date: 2016-06-20 10:12:23
On Mon, Jun 20, 2016 at 09:01:30AM +0200, Johannes Schindelin wrote:
On Sun, 19 Jun 2016, Jeff King wrote:quoted
I think traditionally we've avoided struct assignment because some ancient compilers didn't do it. But it's in C89, and I suspect it's crept into the code base anyway over the years without anyone complaining.I fear that's my fault, at least partially, seeing as merge-recursive.c even *returns* structs (see 6d297f81; I plan to fix that as part of the cleaned-up am-3-merge-recursive-direct patch series).
Heh, that commit is quite old. If nobody has complained about it, then I think there is nothing to be sorry about. If struct assignment (and returns) work everywhere, and they make the code easier to read, we should be using them. I am on the fence regarding oidcpy/oidclr. I agree they _could_ be struct assignments, but it is also convenient to have concept wrapped up in a function, in case we ever want to do anything more complicated. -Peff