Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 4796f99

Browse files
Merge pull request #495 from github-for-unity/fixes/default-struct-null-check
Correctly returning null when the value is default
2 parents e41f883 + 679719b commit 4796f99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GitHub.Api/Git/GitConfig.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ public ConfigBranch(string name, ConfigRemote? remote)
5050
this.remote = remote ?? ConfigRemote.Default;
5151
}
5252

53-
public bool IsTracking => !remote.Equals(ConfigRemote.Default);
53+
public bool IsTracking => Remote.HasValue;
5454

5555
public string Name => name;
5656

57-
public ConfigRemote? Remote => remote;
57+
public ConfigRemote? Remote => Equals(remote, ConfigRemote.Default) ? (ConfigRemote?) null : remote;
5858

5959
public override string ToString()
6060
{

0 commit comments

Comments
 (0)