Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add default .gitattributes #70

Merged
merged 2 commits into from
Jun 22, 2021
Merged

Conversation

davidkydd
Copy link
Collaborator

No description provided.

Copy link
Member

@Tatsinnit Tatsinnit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Looks good, nothing much to add from my end, wider eyes more discussion here, but +1 from my side. thanks.

@davidkydd
Copy link
Collaborator Author

davidkydd commented Jun 21, 2021

I think this change could potentially introduce conflicts (whole file appears to have changed) in helper.go for those on windows without autocrlf = true. Setting git config --global core.autocrlf true should fix the issue in that case, and is generally recommended on windows anyway (see https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration, core.autocrlf section)

@Tatsinnit
Copy link
Member

Tatsinnit commented Jun 21, 2021

I think this change could potentially introduce conflicts (whole file appears to have changed) in helper.go for those on windows without autocrlf = true. Setting git config --global core.autocrlf true should fix the issue in that case, and is generally recommended on windows anyway (see https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration, core.autocrlf section)

Yeah, I did notice that but not sure if it was intentional, sounds good, if intention was to only make change to one file i.e. .gitignore then lets revert other, I can approve once other files are reverted and go ahead with merge if this sounds good? Or you area asking for hand for reverting this?

@Tatsinnit Tatsinnit self-requested a review June 21, 2021 22:16
@davidkydd
Copy link
Collaborator Author

I think this change could potentially introduce conflicts (whole file appears to have changed) in helper.go for those on windows without autocrlf = true. Setting git config --global core.autocrlf true should fix the issue in that case, and is generally recommended on windows anyway (see https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration, core.autocrlf section)

Yeah, I did notice that but not sure if it was intentional, sounds good, if intention was to only make change to one file i.e. .gitignore and revert other, I can approve and go ahead with merge if this sounds good? Or you area asking for hand for reverting this?

This should be merged as is, the changes to the other files are only line ending changes, and due to running "git add renormalize" to standardize all text file line endings to LF (what we want the repo side to have, and how it will stay with text=auto gitattribute set).

Otherwise we risk an inconsistent mish mash of CRLF and LF files repo side, which can lead to erroneous conflicts when we have developers working on both windows and *nix in the same repo.

@Tatsinnit Tatsinnit merged commit bdb3847 into Azure:master Jun 22, 2021
johnsonshi pushed a commit to SanyaKochhar/aks-periscope that referenced this pull request Jul 7, 2021
add default .gitattributes file and git add --renormalize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants