Junio C Hamano [off-list ref] writes:
quoted
quoted
This open(..., ce->ce_mode) call is way insufficient.
...
But all that is unnecessary once you port this to C. So the comment
does not apply to the code you wrote, I think, and should just be
dropped.
Sorry, forgot to mention one thing. Using ce->ce_mode to create the
output file is the way how helpers in entry.c check out paths from
the index to the working tree, so the code is OK. It's just the
copied comment was about the issue that your code did not even have
to worry about.
Thanks.