mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00: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…
Add table
Add a link
Reference in a new issue