Re: Can we amend gitignore so git postgresql works with git on windows using Msys/Mingw64

From: "Regina Obe" <lr(at)pcorp(dot)us>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'David Rowley'" <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: "'PostgreSQL-development'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Can we amend gitignore so git postgresql works with git on windows using Msys/Mingw64
Date: 2016-03-26 18:30:16
Message-ID: 000401d1878d$8b271d70$a1755850$@pcorp.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> You can change the setting with:
> git config --global core.autocrlf input

> Still, it's fair to wonder if we shouldn't add an entry for this to our
.gitattributes. I'm actually wondering why we wouldn't apply it to ALL text
files in git, not just the extensions Regina mentioned.

> regards, tom lane

David,

Thanks for the tip. I'll give that a try. Still I think it's safer to use
.gitattributes.

to Tom's comment,
Here is why. For certain repos, certain files are designated for certain
OS. So you don't want your developer committer's settings controlling the
output.

Take for example windows specific files. I do have lines like

*.vcproj eol=crlf
*.bat eol=crlf

I don't actually think it much matters even for those if they have LF,
except for batch scripts it looks a bit wonky in some windows editors if
they don't have CRLF breaks.

I'm also not clear what Mac does. Does Mac still do CR (instead of LF, I
thought it used to). Does that mean if they switch their ending I'd
suddenly be getting Mac endings?

https://help.github.com/articles/dealing-with-line-endings/

As that above links says - "This file is committed into the repository and
overrides an individual's core.autocrlf setting, ensuring consistent
behavior for all users, regardless of their Git settings."

I think consistency is more important in this case.

Thanks,
Regina

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2016-03-26 19:09:33 Re: multivariate statistics v14
Previous Message Piotr Stefaniak 2016-03-26 18:29:25 Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c