It’s true that searching for something will return the lines as they’re formatted. I’m certainly curious to hear how whitespace changes over time in git grep causes problems, what the problems are, and what the alternatives are. I can imagine reasons that might happen, but that particular example isn’t something I’ve experienced myself or heard of before, so I don’t know if I’m discounting it unfairly. Like I said in defense of your comment higher up, I see why people like you react to certain formatting tools this way, but it turns out that tools that insert and delete line breaks are far more serious when it comes to workflow implications than tools that only insert spaces or tabs to get vertical alignment, so it’s worth making that distinction right from the start.
I don’t think vertical alignment is going away, I think it will become far more common, and that our tools will catch up. My prediction is that git and other source control systems become more tolerant of formatting changes, and that developers in general will learn more workflow techniques for allowing whitespace churn.
For me, having the alignment and making the code more readable to me is more valuable than the minor inconveniences with source control that it might cause, and on top of that I’ve learned that there are ways to mitigate most of the issues. I’m not arguing that it doesn’t cause any problems, I’m only saying that it’s worth prioritizing for me, that there are things you can learn to do about it, that the tools give you options and will probably improve, and that vertical alignment in particular does far less damage that line-breaking reflows like clang-format impose… and use of clang-format is pretty widespread and standard in my experience.
Code does change over time. Refactoring happens. Variables are renamed. Comments change over time. We don’t ask people to avoid writing code or adding comments because the changes appear in git diff or grep, or even because they might cause merge conflicts… those things are considered an acceptable cost of doing business in software. I don’t see any reason to treat good formatting differently, within reason.