Deploying the NuGetGallery locally from VS results in a bootstrap.min.css file modification even if the file hasn't been changed. This is somewhat annoying as I have to constantly work around the modified css file when staging changes.
PS C:\git\NuGetGallery> git config core.autocrlf
true
On checkout we have CRLF line endings in the working directory:
PS C:\git\NuGetGallery> git ls-files --eol
...
i/lf w/crlf attr/text=auto src/NuGetGallery/Content/gallery/css/bootstrap.min.css
...
After deploying the line endings are now LF:
PS C:\git\NuGetGallery> git ls-files --eol
...
i/lf w/lf attr/text=auto src/NuGetGallery/Content/gallery/css/bootstrap.min.css
...
Examining the diff:
PS C:\git\NuGetGallery> git diff HEAD --no-ext-diff --patch-with-raw -z --no-color -- .\src\NuGetGallery\Content\gallery\css\bootstrap.min.css
warning: in the working copy of 'src/NuGetGallery/Content/gallery/css/bootstrap.min.css', LF will be replaced by CRLF the next time Git touches it
I suspect the reason the line endings are changing has something to do with style rendering that bundles the minified css files:
|
@Styles.Render("~/Content/gallery/css/site.min.css") |
|
@Styles.Render("~/Content/gallery/css/bootstrap.min.css") |
One solution that I think would work is to prevent git from modifying line endings for the bootstrap.min.cs file by adding this line to .gitattributes:
Deploying the NuGetGallery locally from VS results in a
bootstrap.min.cssfile modification even if the file hasn't been changed. This is somewhat annoying as I have to constantly work around the modified css file when staging changes.On checkout we have CRLF line endings in the working directory:
After deploying the line endings are now LF:
Examining the diff:
I suspect the reason the line endings are changing has something to do with style rendering that bundles the minified css files:
NuGetGallery/src/NuGetGallery/Views/Shared/Gallery/Layout.cshtml
Lines 31 to 32 in 314756d
One solution that I think would work is to prevent git from modifying line endings for the
bootstrap.min.csfile by adding this line to.gitattributes: