Skip to content

Commit

Permalink
fix project without git
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniciusAlberkovics committed Sep 14, 2019
1 parent 05fa367 commit d32b208
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions GitAutoFetch/AutoFetch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,20 @@ private async void ExecCmd()
{
try
{
while (true)
while (!DisposeGit)
{
if (DisposeGit)
break;

DTE dte = await package.GetServiceAsync(typeof(DTE)).ConfigureAwait(false) as DTE;

if (dte != null && dte.Solution.IsOpen)
{
string solutionDir = Path.GetDirectoryName(dte.Solution.FullName);
dte.ExecuteCommand("Team.Git.Fetch");
try
{
dte.ExecuteCommand("Team.Git.Fetch");
}
catch (Exception)
{
break;
}
}
Thread.Sleep(TimeSpan.FromMinutes(Config.TimeValue()));
}
Expand Down
2 changes: 1 addition & 1 deletion GitAutoFetch/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="ca8e6794-e60f-460f-9abd-c10f926deb99" Version="1.1.2" Language="en-US" Publisher="Zwei Developer" />
<Identity Id="ca8e6794-e60f-460f-9abd-c10f926deb99" Version="1.1.3" Language="en-US" Publisher="Zwei Developer" />
<DisplayName>GitAutoFetch</DisplayName>
<Description xml:space="preserve">Auto fetch in Git, menu location in solution explorer (Git AutoFetch and Configure Fetching)</Description>
<Icon>Logo.png</Icon>
Expand Down

0 comments on commit d32b208

Please sign in to comment.