Recent

Author Topic: Git Related Questions  (Read 409 times)

Aruna

  • Full Member
  • ***
  • Posts: 113
Git Related Questions
« on: December 03, 2022, 11:08:50 pm »
Hi Everyone ,

This thread is related to a question asked by @KodeZwerg in another thread where the subject was:

 Topic: "TestAll" and other removed example projects 

@KodeZwerg, if you have any questions related to git this is the place to ask.  I guess it would be ok for anyone who may have general questions about Git to ask here as well.

Thanks, Aruna

cdbc

  • Sr. Member
  • ****
  • Posts: 414
    • http://www.cdbc.dk
Re: Git Related Questions
« Reply #1 on: December 04, 2022, 12:23:45 pm »
Hi
Nice  ;)
Good on you Aruna. Will do...
Regards Benny
If it ain't broke, don't fix it ;)

Aruna

  • Full Member
  • ***
  • Posts: 113
Re: Git Related Questions
« Reply #2 on: December 04, 2022, 03:57:21 pm »
Hi
Nice  ;)
Good on you Aruna. Will do...
Regards Benny
Hi Benny, I think you should thank @JuhaManninen it was his idea I am just carrying out orders from higher up  :D Seriously though I hope people will find this thread useful  :)
« Last Edit: December 04, 2022, 04:00:04 pm by Aruna »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4170
  • I like bugs.
Re: Git Related Questions
« Reply #3 on: December 17, 2022, 09:03:11 am »
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.
« Last Edit: December 17, 2022, 10:17:20 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018