1. Gimmy Susan
  2. PowerBuilder
  3. Thursday, 5 May 2022 10:55 AM UTC

 Hi

There is a file or menu that will let me change the settings on how to deal with line endings

I read there are 3 options:

  1. Checkout Windows-style, commit Unix-style

    Git will convert LF to CRLF when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects, this is the recommended setting on Windows ("core.autocrlf" is set to "true")

  2. Checkout as-is, commit Unix-style

    Git will not perform any conversion when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects this is the recommended setting on Unix ("core.autocrlf" is set to "input").

  3. Checkout as-is, commit as-is

    Git will not perform any conversions when checking out or committing text files. Choosing this option is not recommended for cross-platform projects ("core.autocrlf" is set to "false")

 

- - - 

Let's imagine:

a user with a setting uploads to the remote repositories a pb project.

a second user, with a different configuration, clones the pb project

 

Result:

Powerbuilder, during the clone, modify the project file in ws_object folder and in the refresh phase generate a compilation error.
>>> It seems to modify the project file replacing the crlf. <<<

1- PB modifies the project

2- PB creates compile error on the project object

3- generates error on all objects.


Is it normal ? Has it ever happened to you?
it's strange that all users should have the same configuration....

Thanks in advance for the answer

 

 

 

 

ps: ecosystem

- windows 10

- git: git version 2.36.0.windows.1

- Powerbuilder 2021

 

Attachments (1)
Accepted Answer
René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 5 May 2022 12:55 PM UTC
  2. PowerBuilder
  3. # Permalink

We use a .gitattributes file. Casue it is part of the repository every user have the same configuration.

Example settings for .gitattribute:

*.sr* text eol=crlf
*.pbt text eol=crlf
*.pbr text eol=crlf
*.pbw text eol=crlf
*.txt text eol=crlf

Comment
  1. Gimmy Susan
  2. Thursday, 5 May 2022 13:02 PM UTC
I have to put this file in the same folder where is .gitignore ?
  1. Helpful
  1. René Ullrich
  2. Thursday, 5 May 2022 13:03 PM UTC
Put it in the root directory of your repo.
  1. Helpful 2
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Thursday, 5 May 2022 12:16 PM UTC
  2. PowerBuilder
  3. # 1

This is documented. Take a look at the following link:

Using Source Control - - Users Guide (appeon.com)

It's clearly stated that:

PowerBuilder IDE will add the autocrlf option and set it to true on Windows if no other Git tool has installed and configured such an option. However, if you manually change the setting of autocrlf (from true to false or input), and then download objects from the server, these objects will have LF line endings instead of CRLF, which will cause compilation errors in the PowerBuilder IDE. If such compilation error occurs, you should set autocrlf to true, download files from the server again, and then compile again. For more about the autocrlf option, refer to https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration.

So you have to be sure that all clients that commit changes to git have the correct setting.

Andreas.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.