diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..412eeda --- /dev/null +++ b/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/src/AppHarbor/GitCommand.cs b/src/AppHarbor/GitCommand.cs index 2026ada..4a6eda0 100644 --- a/src/AppHarbor/GitCommand.cs +++ b/src/AppHarbor/GitCommand.cs @@ -22,7 +22,7 @@ public virtual IList Execute(string command) var processArguments = new StringBuilder(); processArguments.AppendFormat("/C "); - processArguments.AppendFormat("\"{0}\" ", _gitExecutable.FullName); + processArguments.AppendFormat("\"{0}\" ", GitExecutable); processArguments.AppendFormat("{0} ", command); var process = new Process @@ -65,5 +65,13 @@ private static DirectoryInfo CurrentDirectory return new DirectoryInfo(Directory.GetCurrentDirectory()); } } + + private string GitExecutable + { + get + { + return _gitExecutable.Exists ? _gitExecutable.FullName : _gitExecutable.Name; + } + } } }