Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions GVFS/GVFS/CommandLine/CloneVerb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
using GVFS.Common.NamedPipes;
using GVFS.Common.Tracing;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;

namespace GVFS.CommandLine
Expand Down Expand Up @@ -240,15 +242,24 @@ public override void Execute()

else
{
Process.Start(new ProcessStartInfo(
fileName: "gvfs",
arguments: "prefetch --commits")
try
{
UseShellExecute = true,
WindowStyle = ProcessWindowStyle.Hidden,
WorkingDirectory = enlistment.EnlistmentRoot
});
this.Output.WriteLine("\r\nPrefetch of commit graph has been started as a background process. Git operations involving history may be slower until prefetch has completed.\r\n");
string gvfsExecutable = Assembly.GetExecutingAssembly().Location;
Process.Start(new ProcessStartInfo(
fileName: gvfsExecutable,
arguments: "prefetch --commits")
{
UseShellExecute = true,
WindowStyle = ProcessWindowStyle.Hidden,
WorkingDirectory = enlistment.EnlistmentRoot
});
this.Output.WriteLine("\r\nPrefetch of commit graph has been started as a background process. Git operations involving history may be slower until prefetch has completed.\r\n");
}
catch (Win32Exception ex)
{
this.Output.WriteLine("\r\nError starting prefetch: " + ex.Message);
this.Output.WriteLine("Run 'gvfs prefetch --commits' from within your enlistment to prefetch the commit graph.");
}
}
}

Expand Down