When you track down and fix a regressioni.e. a bug that caused previously working code to stop workingversion control makes it entirely possible to look up who committed the change that broke it.Is it worth doing this? Is it constructive to point this out to the person that made the commit? Does the nature of the mistake (on the scale of simple inattentiveness to fundamental misunderstanding of the code they changed) change whether or not it's a good idea?If it is a good idea to tell them, what are good ways to do it without causing offense or causing them to get defensive?Assume, for the sake of argument, that the bug is sufficiently subtle that the CI server's automated tests can't pick it up.
Should I tell someone that their commit caused a regression?
version control;issue tracking
If you just approach them to tell them about a mistake they made then unless you are the best diplomat in the world its going to be difficult for it not to just sound like Ha! - look at this mistake you made!.  We are all human and criticism is difficult to take.On the other hand unless the change is completely trivial and obviously wrong I normally find it benificial to talk to the person who committed the original change as part of my investigation just to make sure that I fully understand whats going on, hence the way I usually end up handling these situation is by going over to said person and having a conversation that goes a little like this:Me: I'm working on this bug where ... summary of bug ... and I think I've tracked down the problem to a change you made.  Can you remember what this change was for? / have you got some time to explain this change?Then either:Them: Sure, thats to handle ... situation I wasn't aware of ...Or something along the lines of:Them: Nope sorry I don't remember, looks wrong to me.By going and investigating the change / bug together the original committer gets to learn from their mistakes without just feeling like they are being criticised*, and there is also a pretty good chance that you will learn something too.If the original committer isn't around or is busy then you can alwasy just slog through and figure it all out yourself, I just normally find that talking to the person who originally made the change is quicker.* Of course this is only going to work if you are genuinely interested in the other persons help.  If you are just using this as a thinly disguised method of telling someone about a mistake they made then this is probably worse than just being open about it.