I learnt a valuable lesson today. Some code that I had safe-merged about 6 weeks ago, caused a strange behaviour to manifest itself in the last couple of days.The code crept in during a conflict-less merge. Who knew? We do such merges 10 times a day, 5 days a week, and then some more on weekends.
The issue crept up behind our backs – and manifested as a bug in some totally different part of code. Took a few days of back-tracing until we realised where it was coming from. Took a couple more hours to narrow down the symptoms. And then took a line-by-line code-trace to find the probable cause, and then another diff-history review to look at where it came from.
Turns out that was just a single line of code that the merge didn’t detect as a conflict. Imagine what could happen if it were just a few lines. And the nightmare worsens if it happened to multiple files.
All in all, a valuable lesson learnt. Don’t ever accept a merge without at least a quick once-over review.