And also, we can all imagine a developer who cranks out gigantic commits by padding their comments, or just being verbose, or writing bad complicated code, or even just by moving code around to get big commit numbers. I'm not talking about that.
I'm saying, if you compare apples to apples, and look at a long time horizon (i.e., look at the total of an engineer's contributions over 6 or 12 months), then I claim that yes, generally speaking, there will be a correlation between productivity and LOC. I don't see how it could be otherwise. Software is code.
Edit: Hopefully it's clear that above only applies when comparing a pure-developer to a pure-developer. If your job also includes code reviews, writing design docs, etc, then obviously your LOC goes down.
So yep, with your clarification I am fully with you. As long as we measure people over a long enough timeline then yes, LOC can be an accurate metric. But a lot of other things have to be taken into account as well.
This hits even closer home to me because I am about to get evaluated this Monday and my PR performance has been pretty sub-par in the last 3-4 weeks -- I've been put in a project that has been abandoned for like 3 years and only recently picked up again and 90% of what I do is documenting and taking notes and creating GitHub issues; coding is sadly still a low priority activity because there's still chaos.
But you know what? I don't care anymore. Let them fire me if they use broken metrics. I am doing my work very diligently and I am making sure the project will be in a better shape after me. If they can't appreciate that then I am not bothered by such people viewing me negatively. They are in the wrong, not me.
If, on the other hand, you were on a "smooth sailing" project, and didn't have any code delivered in the last month, that would be a red flag to me, which we would need to talk about.