Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

check the filename casing in git #158

Merged
merged 3 commits into from
Mar 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SourceLink.Create.GitHub/SourceLink.Create.GitHub.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="14.3.0" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.1.548" />
</ItemGroup>

<!-- https://docs.microsoft.com/en-us/dotnet/articles/core/preview3/tools/extensibility -->
Expand Down
6 changes: 6 additions & 0 deletions dotnet-sourcelink-git/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ public static void Create(CommandLineApplication command)
{
filesNotInGit.Add(sf);
}
else if (index.Path != sf.GitPath)
{
// mysysgit sets core.ignorecase true by default
// but most web sites like GitHub are case sensitive
filesNotInGit.Add(sf);
}
else
{
sf.GitHash = index.Id.Sha;
Expand Down
2 changes: 1 addition & 1 deletion dotnet-sourcelink-git/dotnet-sourcelink-git.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>
<Import Project="$(MSBuildThisFileDirectory)../SourceLink.props" />
<!--<Import Project="$(MSBuildThisFileDirectory)../SourceLink.props" />-->
</Project>
8 changes: 5 additions & 3 deletions dotnet-sourcelink/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,12 @@ static IEnumerable<Document> GetDocumentsWithUrlHashes(string pdb)
if(doc.Url != null)
{
HashUrl(hc, doc);
if (doc.Error != null) continue;
if (!doc.Hash.CollectionEquals(doc.UrlHash))
if (doc.Error == null)
{
doc.Error = "url hash does not match: " + doc.Hash.ToHex();
if (!doc.Hash.CollectionEquals(doc.UrlHash))
{
doc.Error = "url hash does not match: " + doc.Hash.ToHex();
}
}
}
yield return doc;
Expand Down
2 changes: 1 addition & 1 deletion dotnet-sourcelink/dotnet-sourcelink.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="System.Reflection.Metadata" Version="1.4.2" />
</ItemGroup>
<Import Project="$(MSBuildThisFileDirectory)../SourceLink.props" />
<!--<Import Project="$(MSBuildThisFileDirectory)../SourceLink.props" />-->
</Project>