An advertisement for "git bisect" command :
This command is very handy when searching for a guilty revision causing a regression bug.
Basically it does a binary search between a known "good" revision and a known "bad" revision. You test a given revision, then give the result as "git bisect good" or "git bisect bad" It automatically splits the remaining revision range and gives you another revision to test ... and so on until it gives you the guilty revision.
Git keeps the whole revision history in its local repository which makes git bisect very snappy and handy.
If somebody wants to help fix a regression bug in Lazarus sources, please try to find its cause with git bisect.
There are some issues to remember. The regression may be far in the history, even years. The sources have changed a lot and some units were moved or renamed. FPC then gives an error when trying to build Lazarus normally, either an "internal error" or it cannot find a certain unit.
Then you must do a clean build, either with "make clean" or using the "Clean all" selection in the Configure Build Lazarus window.
So, you must do clean builds sometimes during the bisect process, but it is not really a problem.
It is better to use a temporary Lazarus configuration with --pcp parameter, like "./lazarus --pcp=~/.lazarus_temp" or similar. Then you don't mess your normal configuration during the process.
Another thing to remember: The "good" and "bad" information you give to Git must be always correct. If you make a mistake once, the result will be useless. If you get only "good" revisions or only "bad" revisions until the end, you probably made a mistake at some point.