While driving to work today, I started wondering what pieces of code are owned by someone, and how you can detect it. Owned means that they are the only one that can touch that code. Whatever it is by policy or simply because they are the only one with the skills / ability to do so.
I wonder if you can use the source control history to figure it out. Something like:
- Find all files changes within the last year
- Remove all files whose changes are over a period of less than two weeks (that usually indicate a completed feature).
- Remove all the files that are modified by more than 2 people.
- Show the result and the associated names.
That might be a good way to indicate a risky location, some place that only very few people can touch and modify.
I started to think about how to do this in Git, but I got lost. Anyone want to try and take that up?