Skip to content

Commit baf5b71

Browse files
committed
converting tabs to spaces
1 parent a6ae341 commit baf5b71

5 files changed

+91
-43
lines changed

.gitattributes

+32-36
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,46 @@
11
# Auto detect text files and perform LF normalization
22
* text=auto
33

4-
54
# Custom for Visual Studio
6-
*.cs text diff=csharp eol=crlf
7-
*.sln text merge=union eol=crlf
8-
*.csproj text merge=union eol=crlf
9-
*.vbproj text merge=union
10-
*.fsproj text merge=union
11-
*.dbproj text merge=union
12-
*.ascx text eol=crlf
13-
*.xaml text eol=crlf
14-
*.cmd text eol=crlf
15-
*.ps1 text eol=crlf
16-
*.coffee text eol=crlf
17-
*.config text eol=crlf
18-
*.css text eol=crlf
19-
*.nuspec text eol=crlf
20-
*.scss text eol=crlf
21-
*.cshtml text eol=crlf
22-
*.htm text eol=crlf
23-
*.html text eol=crlf
24-
*.js text eol=crlf
25-
*.ts text eol=crlf
26-
*.msbuild text eol=crlf
27-
*.resx text merge=union
28-
*.ruleset text
29-
*.Stylecop text
30-
*.targets text eol=crlf
31-
*.tt text
32-
*.txt text eol=crlf
33-
*.vb text eol=crlf
34-
*.vbhtml text eol=crlf
35-
*.xml text eol=crlf
36-
*.xunit text eol=crlf
5+
*.cs text diff=csharp eol=crlf filter=raven-spacify
6+
*.sln text merge=union eol=crlf filter=raven-spacify
7+
*.csproj text merge=union eol=crlf filter=raven-spacify
8+
*.vbproj text merge=union filter=raven-spacify
9+
*.fsproj text merge=union filter=raven-spacify
10+
*.dbproj text merge=union filter=raven-spacify
11+
*.ascx text eol=crlf filter=raven-spacify
12+
*.xaml text eol=crlf filter=raven-spacify
13+
*.cmd text eol=crlf filter=raven-spacify
14+
*.ps1 text eol=crlf filter=raven-spacify
15+
*.coffee text eol=crlf filter=raven-spacify
16+
*.config text eol=crlf filter=raven-spacify
17+
*.css text eol=crlf filter=raven-spacify
18+
*.nuspec text eol=crlf filter=raven-spacify
19+
*.scss text eol=crlf filter=raven-spacify
20+
*.cshtml text eol=crlf filter=raven-spacify
21+
*.htm text eol=crlf filter=raven-spacify
22+
*.html text eol=crlf filter=raven-spacify
23+
*.js text eol=crlf filter=raven-spacify
24+
*.ts text eol=crlf filter=raven-spacify
25+
*.msbuild text eol=crlf filter=raven-spacify
26+
*.resx text merge=union filter=raven-spacify
27+
*.ruleset text filter=raven-spacify
28+
*.Stylecop text filter=raven-spacify
29+
*.targets text eol=crlf filter=raven-spacify
30+
*.tt text filter=raven-spacify
31+
*.txt text eol=crlf filter=raven-spacify
32+
*.vb text eol=crlf filter=raven-spacify
33+
*.vbhtml text eol=crlf filter=raven-spacify
34+
*.xml text eol=crlf filter=raven-spacify
35+
*.xunit text eol=crlf filter=raven-spacify
36+
*.java text eol=lf filter=raven-spacify
3737

3838
*.bmp binary
3939
*.gif binary
4040
*.ico binary
4141
*.jpg binary
4242
*.png binary
4343

44-
45-
4644
# Standard to msysgit
4745
*.doc diff=astextplain
4846
*.DOC diff=astextplain
@@ -54,5 +52,3 @@
5452
*.PDF diff=astextplain
5553
*.rtf diff=astextplain
5654
*.RTF diff=astextplain
57-
58-
*.java text eol=lf

git_setup.cmd

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
3+
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\git_setup.ps1' %*

git_setup.ps1

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
$gitPath = "C:\Program Files\Git\bin\git.exe";
2+
If (Test-Path $gitPath) {
3+
} else {
4+
$gitPath = "C:\Program Files (x86)\Git\bin\git.exe";
5+
}
6+
7+
$filterToInsert = 'expand --tabs=4 --initial'
8+
9+
&$gitPath config --global filter.raven-spacify.clean $filterToInsert
10+
11+
$filterThatWasInserted = &$gitPath config --global --get filter.raven-spacify.clean
12+
13+
if ($filterToInsert -eq $filterThatWasInserted) {
14+
Write-Host 'Git setup successful. Filter added.' -foregroundcolor "green"
15+
} else {
16+
Write-Host 'Git setup failed. Filter was not added.' -foregroundcolor "red"
17+
}

normalize-crlf.ps1

-7
This file was deleted.

normalize.ps1

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
foreach ($ext in @(
2+
"*.cs",
3+
"*.sln",
4+
"*.csproj",
5+
"*.vbproj",
6+
"*.fsproj",
7+
"*.dbproj",
8+
"*.ascx",
9+
"*.xaml",
10+
"*.cmd",
11+
"*.ps1",
12+
"*.coffee",
13+
"*.config",
14+
"*.css",
15+
"*.nuspec",
16+
"*.scss",
17+
"*.cshtml",
18+
"*.htm",
19+
"*.html",
20+
"*.js",
21+
"*.ts",
22+
"*.msbuild",
23+
"*.resx",
24+
"*.ruleset",
25+
"*.Stylecop",
26+
"*.targets",
27+
"*.tt",
28+
"*.txt",
29+
"*.vb",
30+
"*.vbhtml",
31+
"*.xml",
32+
"*.xunit",
33+
"*.java")) {
34+
(dir -Recurse -Filter $ext) | foreach {
35+
$file = gc $_.FullName
36+
$file | sc $_.FullName
37+
}
38+
39+
}

0 commit comments

Comments
 (0)