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

Consider capturing git the line break configuration in sourcelink json #613

Open
tmat opened this issue May 14, 2020 · 5 comments
Open

Consider capturing git the line break configuration in sourcelink json #613

tmat opened this issue May 14, 2020 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@tmat
Copy link
Member

tmat commented May 14, 2020

This change in .NET SDK added assembly-level attribute with git repo clone URL: dotnet/sdk#11559

This can be used to optimize download of all source file required to build the dll. If however, the git configuration (specifically core.eol and core.autocrlf settings) differ between the server that originally built the DLL and the local repo the re-build will produce different binaries.

It would thus be useful to record the git settings in Source Link record so that the clone can be configured the same as the build server that produced the binary.

Note: Check if git line conversion changes the BOM.

@tmat
Copy link
Member Author

tmat commented May 14, 2020

@clairernovotny

@tmat tmat added this to the 1.1.0 milestone May 14, 2020
@tmat tmat added the enhancement New feature or request label May 14, 2020
@bording
Copy link

bording commented May 14, 2020

I think the situation is more involved than those settings you've mentioned. If the repo has a .gitattributes file defined, the values in it override any local configuration settings.

@tmat
Copy link
Member Author

tmat commented May 14, 2020

Yes, but .gitattributes would be cloned with the repo. We only need to capture configuration that's not stored on the source server.

@bording
Copy link

bording commented May 14, 2020

We only need to capture configuration that's not stored on the source server.

I guess I'm missing when you'd think those values would matter. Are you thinking of cases where the repo doesn't have a .gitattributes file?

@tmat
Copy link
Member Author

tmat commented May 14, 2020

Yes, also in case when .gitattributes doesn't specify line breaks for all files that are input to the compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants