fix: missing empty check for %(upstream:trackshort) (#273)

This commit is contained in:
leo 2024-07-22 16:01:26 +08:00
parent 720b2b65f3
commit b972bfd5f1
No known key found for this signature in database

View file

@ -73,7 +73,7 @@ namespace SourceGit.Commands
branch.IsCurrent = parts[2] == "*";
branch.Upstream = parts[3];
if (branch.IsLocal && !parts[4].Equals("=", StringComparison.Ordinal))
if (branch.IsLocal && !string.IsNullOrEmpty(parts[4]) && !parts[4].Equals("=", StringComparison.Ordinal))
_needQueryTrackStatus.Add(branch);
else
branch.TrackStatus = new Models.BranchTrackStatus();