diff options
author | nulltoken <emeric.fermas@gmail.com> | 2011-05-03 20:30:05 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2011-05-04 00:03:07 +0400 |
commit | 73a3fc1b493ff2266391b92aba1a9cdab9c96398 (patch) | |
tree | 11a0ac46837f9674fb4d02907bd6b8d9aad29365 /LibGit2Sharp/Branch.cs | |
parent | 51bc57b085e37e4311c386b75c424182c502a4a4 (diff) |
Fix some issues pinpointed by Code Analysis
Diffstat (limited to 'LibGit2Sharp/Branch.cs')
-rw-r--r-- | LibGit2Sharp/Branch.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/LibGit2Sharp/Branch.cs b/LibGit2Sharp/Branch.cs index b0961e44..3918ee6b 100644 --- a/LibGit2Sharp/Branch.cs +++ b/LibGit2Sharp/Branch.cs @@ -1,4 +1,5 @@ using System; +using System.Globalization; using LibGit2Sharp.Core; namespace LibGit2Sharp @@ -109,22 +110,22 @@ namespace LibGit2Sharp private static bool IsRemoteBranch(string canonicalName) { - return canonicalName.StartsWith("refs/remotes/"); + return canonicalName.StartsWith("refs/remotes/", StringComparison.Ordinal); } private static string ShortenName(string branchName) { - if (branchName.StartsWith("refs/heads/")) + if (branchName.StartsWith("refs/heads/", StringComparison.Ordinal)) { return branchName.Substring("refs/heads/".Length); } - if (branchName.StartsWith("refs/remotes/")) + if (branchName.StartsWith("refs/remotes/", StringComparison.Ordinal)) { return branchName.Substring("refs/remotes/".Length); } - throw new ArgumentException(string.Format("'{0}' does not look like a valid branch name.", branchName)); + throw new ArgumentException(string.Format(CultureInfo.InvariantCulture,"'{0}' does not look like a valid branch name.", branchName)); } /// <summary> |