mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -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 =
|
public static readonly FuncValueConverter<string, string> TrimRefsPrefix =
|
||||||
new FuncValueConverter<string, string>(v =>
|
new FuncValueConverter<string, string>(v =>
|
||||||
{
|
{
|
||||||
|
if (v == null)
|
||||||
|
return string.Empty;
|
||||||
if (v.StartsWith("refs/heads/", StringComparison.Ordinal))
|
if (v.StartsWith("refs/heads/", StringComparison.Ordinal))
|
||||||
return v.Substring(11);
|
return v.Substring(11);
|
||||||
if (v.StartsWith("refs/remotes/", StringComparison.Ordinal))
|
if (v.StartsWith("refs/remotes/", StringComparison.Ordinal))
|
||||||
|
|
Loading…
Reference in a new issue