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

Commit 2ff8713

Browse files
Nit picking
1 parent 4cb76ea commit 2ff8713

File tree

4 files changed

+28
-35
lines changed

4 files changed

+28
-35
lines changed

src/GitHub.Api/OutputProcessors/GitAheadBehindStatusOutputProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public override void LineReceived(string line)
1414
var ahead = int.Parse(proc.ReadUntilWhitespace());
1515
var behind = int.Parse(proc.ReadToEnd());
1616

17-
RaiseOnEntry(new GitAheadBehindStatus { ahead = ahead, behind = behind });
17+
RaiseOnEntry(new GitAheadBehindStatus(ahead, behind));
1818
}
1919
}
2020
}

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -843,29 +843,6 @@ sealed class GitStatusCache : ManagedCacheBase<GitStatusCache>, IGitStatusCache
843843
public GitStatusCache() : base(true)
844844
{ }
845845

846-
public override string LastUpdatedAtString
847-
{
848-
get { return lastUpdatedAtString; }
849-
protected set { lastUpdatedAtString = value; }
850-
}
851-
852-
public override string LastVerifiedAtString
853-
{
854-
get { return lastVerifiedAtString; }
855-
protected set { lastVerifiedAtString = value; }
856-
}
857-
858-
public override string InitializedAtString
859-
{
860-
get { return initializedAtString; }
861-
protected set { initializedAtString = value; }
862-
}
863-
864-
public override TimeSpan DataTimeout
865-
{
866-
get { return TimeSpan.FromMinutes(1); }
867-
}
868-
869846
public int Ahead
870847
{
871848
get
@@ -937,6 +914,29 @@ public List<GitStatusEntry> Entries
937914
SaveData(now, isUpdated);
938915
}
939916
}
917+
918+
public override string LastUpdatedAtString
919+
{
920+
get { return lastUpdatedAtString; }
921+
protected set { lastUpdatedAtString = value; }
922+
}
923+
924+
public override string LastVerifiedAtString
925+
{
926+
get { return lastVerifiedAtString; }
927+
protected set { lastVerifiedAtString = value; }
928+
}
929+
930+
public override string InitializedAtString
931+
{
932+
get { return initializedAtString; }
933+
protected set { initializedAtString = value; }
934+
}
935+
936+
public override TimeSpan DataTimeout
937+
{
938+
get { return TimeSpan.FromMinutes(1); }
939+
}
940940
}
941941

942942
[Location("cache/gitlocks.yaml", LocationAttribute.Location.LibraryFolder)]

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/HistoryView.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -358,15 +358,8 @@ private void MaybeUpdateData()
358358
currentRemoteHasUpdate = false;
359359

360360
var currentRemote = Repository.CurrentRemote;
361-
if (currentRemote.HasValue && !string.IsNullOrEmpty(currentRemote.Value.name))
362-
{
363-
hasRemote = true;
364-
currentRemoteName = currentRemote.Value.Name;
365-
}
366-
else
367-
{
368-
currentRemoteName = null;
369-
}
361+
hasRemote = currentRemote.HasValue;
362+
currentRemoteName = hasRemote ? currentRemote.Value.Name : "placeholder";
370363
}
371364

372365
if (currentStatusHasUpdate)
@@ -375,8 +368,8 @@ private void MaybeUpdateData()
375368

376369
statusAhead = Repository.CurrentAhead;
377370
statusBehind = Repository.CurrentBehind;
378-
var currentChanges = Repository.CurrentChanges;
379371

372+
var currentChanges = Repository.CurrentChanges;
380373
hasItemsToCommit = currentChanges != null
381374
&& currentChanges.Any(entry => entry.Status != GitFileStatus.Ignored && !entry.Staged);
382375
}

src/tests/IntegrationTests/SetUpFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public void Setup()
1414

1515
Logging.LogAdapter = new MultipleLogAdapter(
1616
new FileLogAdapter($"..\\{DateTime.UtcNow.ToString("yyyyMMddHHmmss")}-integration-tests.log")
17-
, new ConsoleLogAdapter()
17+
//, new ConsoleLogAdapter()
1818
);
1919
}
2020
}

0 commit comments

Comments
 (0)