mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
fix: NRE on commit filters
This commit is contained in:
parent
20744d09bd
commit
d2d95e09b7
1 changed files with 2 additions and 0 deletions
|
@ -87,6 +87,8 @@ namespace SourceGit.Converters
|
|||
public static readonly FuncValueConverter<string, string> TrimRefsPrefix =
|
||||
new FuncValueConverter<string, string>(v =>
|
||||
{
|
||||
if (v == null)
|
||||
return string.Empty;
|
||||
if (v.StartsWith("refs/heads/", StringComparison.Ordinal))
|
||||
return v.Substring(11);
|
||||
if (v.StartsWith("refs/remotes/", StringComparison.Ordinal))
|
||||
|
|
Loading…
Reference in a new issue