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

Commit 9914d79

Browse files
Merge branch 'master' into fixes/user-update
2 parents b8e7097 + cf05f5f commit 9914d79

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
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
{

src/UnityExtension/Assets/Editor/GitHub.Unity/ApplicationCache.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,10 @@ private bool ValidateInitialized()
148148
var notInitialized = ApplicationCache.Instance.FirstRunAt > InitializedAt;
149149
if (notInitialized)
150150
{
151-
Logger.Trace("Initialized");
152-
InitializedAt = DateTimeOffset.Now;
153-
Save(true);
151+
Logger.Trace("Not Initialized");
154152

155153
if (invalidOnFirstRun)
156154
{
157-
Logger.Trace("FirstRun Invalidation");
158155
InvalidateData();
159156
}
160157
}
@@ -166,11 +163,15 @@ public void InvalidateData()
166163
{
167164
Logger.Trace("Invalidate");
168165
CacheInvalidated.SafeInvoke();
169-
SaveData(DateTimeOffset.Now, false);
170166
}
171167

172168
protected void SaveData(DateTimeOffset now, bool isUpdated)
173169
{
170+
if (InitializedAt == DateTimeOffset.MinValue)
171+
{
172+
InitializedAt = now;
173+
}
174+
174175
if (isUpdated)
175176
{
176177
LastUpdatedAt = now;

0 commit comments

Comments
 (0)