Thread: Today's pgjdbc release causing git clone issues

Today's pgjdbc release causing git clone issues

From
John Harvey
Date:
Hello,

I have a question about today's release of pgjdbc.  I tried cloning down the code on a RHEL7 box today, and I was confused when I couldn't switch branches because of a conflict.  I looked into it a little deeper, and tried the following procedure:

cd pgjdbc
git status

In running that command, 4 files have been auto-modified on the clone:
# modified:   org/postgresql/test/ssl/SslTest.java
# modified:   org/postgresql/translation/de.po
# modified:   org/postgresql/util/PGTime.java
# modified:   org/postgresql/util/PGTimestamp.java

This is unusual behavior for me.  What's even stranger is that I cannot switch branches because some of these files have conflicts.  Doing some research, I see that the new .gitattributes file has the following line in it:

* text=auto

I found a link that discusses this issue a bit:
Unfortunately, I've tried everything in the post, and the only thing that works is to immediately git reset after clone, or to modify the .gitattributes file.

Is this desired behavior?  Does anyone have a suggestion what I need to do to work around it?

Thank you,
  -John


Re: Today's pgjdbc release causing git clone issues

From
Dave Cramer
Date:
I gather I will have to commit the changes caused by the automatic changes to stop this behaviour

Thanks for the report


On 3 November 2015 at 23:33, John Harvey <john.harvey@crunchydata.com> wrote:
Hello,

I have a question about today's release of pgjdbc.  I tried cloning down the code on a RHEL7 box today, and I was confused when I couldn't switch branches because of a conflict.  I looked into it a little deeper, and tried the following procedure:

cd pgjdbc
git status

In running that command, 4 files have been auto-modified on the clone:
# modified:   org/postgresql/test/ssl/SslTest.java
# modified:   org/postgresql/translation/de.po
# modified:   org/postgresql/util/PGTime.java
# modified:   org/postgresql/util/PGTimestamp.java

This is unusual behavior for me.  What's even stranger is that I cannot switch branches because some of these files have conflicts.  Doing some research, I see that the new .gitattributes file has the following line in it:

* text=auto

I found a link that discusses this issue a bit:
Unfortunately, I've tried everything in the post, and the only thing that works is to immediately git reset after clone, or to modify the .gitattributes file.

Is this desired behavior?  Does anyone have a suggestion what I need to do to work around it?

Thank you,
  -John



Re: Today's pgjdbc release causing git clone issues

From
Vladimir Sitnikov
Date:
>Is this desired behavior?  Does anyone have a suggestion what I need to do to work around it?

Here's the required change: https://github.com/pgjdbc/pgjdbc/pull/418

The problem was those 4 files were stored in dos format (CRLF),
however text files should be in LF.
The solution is Dave converts the offending files to LF once, then all
things should be smooth.

Vladimir


Re: Today's pgjdbc release causing git clone issues

From
Dave Cramer
Date:
Vladimir, thanks for the quick solution. 


On 4 November 2015 at 07:45, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
>Is this desired behavior?  Does anyone have a suggestion what I need to do to work around it?

Here's the required change: https://github.com/pgjdbc/pgjdbc/pull/418

The problem was those 4 files were stored in dos format (CRLF),
however text files should be in LF.
The solution is Dave converts the offending files to LF once, then all
things should be smooth.

Vladimir

Re: Today's pgjdbc release causing git clone issues

From
John Harvey
Date:
Everything works great.

Thank you for the fast turnaround.

-John

On Wed, Nov 4, 2015 at 7:11 AM, Dave Cramer <pg@fastcrypt.com> wrote:
Vladimir, thanks for the quick solution. 


On 4 November 2015 at 07:45, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
>Is this desired behavior?  Does anyone have a suggestion what I need to do to work around it?

Here's the required change: https://github.com/pgjdbc/pgjdbc/pull/418

The problem was those 4 files were stored in dos format (CRLF),
however text files should be in LF.
The solution is Dave converts the offending files to LF once, then all
things should be smooth.

Vladimir