thanx for the feedback @Sicro
Sicro wrote:These files I find important and should not be ignored.
For example, ignoring the files can cause problems when code must be compiled with EnableThreadSafe.
I wasnt' aware of this issue regarding threads.
The rationale for including these config files in the exclusion list is that when versioning a PB project with Git, PureBASIC IDE should be set to "Save Settings to: A common file project .cfg for every directory" or to "The file <filename>.pb.cfg" (or to "none"). If set to "The end of the source file" then the source file will always change because of cursor position saving, marker position, etc, leading to Git seeing a file change and requiring spurious commits.
Even with the IDE set to save the cgf info in separate files, these cfg files will change often and if not ignored they become an impedment when swtiching branches (you'll need to either commit them, stash them or discard them). And if different contributors are using different settings, merging the various configurations into each other will create chaos (and an endless list of commits).
I though that since they are created for each user they shouldn't really be shared, and that PureBASIC should handle by itself corrections to these files when a new version of the source is pulled/merged in, correcting any references no longer valid. Usually, when I move source files to another folder (leaving behind the folder-based cfg file) I don't experienc problems: PB just recreates it. But I might be missing some specific cases here, like the EnableThreadSafe you mentioned.
Could you give more details on how the problems might manifest? and which entries in the cfg section are crucial to preserve?
Since the idea of using .gitignore template is to save typing long lists of file patterns, instead of deleting these entries the solution could be to comment them out and let the user decide if he needs them and uncomment these lines. Or, if the cases when ignoring them is problematic are not so common, the user could comment them out on a per project bases. So it dependes on which case is the most common --- so far I didn't experience any problems by ignoring them, because PB IDE recreated them on the other end without problems.
Also, let's say the user has set the IDE to "Save Settings to: The file <filename>.pb.cfg", in this case the lines:
are the general rule, and for specific files which might need tracking their .cfg file the user could add a negation to preserve them:
Code: Select all
*.pb.cfg
*.pbi.cfg
# exclusion exceptions:
!somefile.cfg
Which approach you think would be better?