Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove more references to ReadObjectHook
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
  • Loading branch information
derrickstolee committed Oct 3, 2019
commit eea8c54694c28aac9e24a149ba68ec8cf173747a
6 changes: 0 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ Note that Scalar on Mac is under active development.
git clone https://github.com/microsoft/scalar.git src
```

* Using XCode, open `Scalar/ReadObjectHook/Scalar.ReadObjectHook.Mac.xcodeproj`.

* Select the `Scalar.ReadObjectHook.Mac` project.
* Under "Signing", select your developer certificate, which may be an organization
certificate.

* Run the build and installation scripts:

```
Expand Down
14 changes: 10 additions & 4 deletions Scalar.Common/Git/GitProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ public Result MultiPackIndexRepack(string gitObjectDirectory, string batchSize)
return this.InvokeGitAgainstDotGitFolder($"-c pack.threads=1 multi-pack-index repack --object-dir=\"{gitObjectDirectory}\" --batch-size={batchSize}");
}

public Process GetGitProcess(string command, string workingDirectory, string dotGitDirectory, bool useReadObjectHook, bool redirectStandardError, string gitObjectsDirectory)
public Process GetGitProcess(string command, string workingDirectory, string dotGitDirectory, bool fetchMissingObjects, bool redirectStandardError, string gitObjectsDirectory)
{
ProcessStartInfo processInfo = new ProcessStartInfo(this.gitBinPath);
processInfo.WorkingDirectory = workingDirectory;
Expand Down Expand Up @@ -632,9 +632,9 @@ public Process GetGitProcess(string command, string workingDirectory, string dot
processInfo.EnvironmentVariables["GIT_OBJECT_DIRECTORY"] = gitObjectsDirectory;
}

if (!useReadObjectHook)
if (!fetchMissingObjects)
{
command = "-c " + GitConfigSetting.CoreVirtualizeObjectsName + "=false " + command;
command = "-c " + "core.usegvfshelper=false " + command;
}

if (!string.IsNullOrEmpty(dotGitDirectory))
Expand Down Expand Up @@ -670,7 +670,13 @@ protected virtual Result InvokeGitImpl(
// From https://msdn.microsoft.com/en-us/library/system.diagnostics.process.standardoutput.aspx
// To avoid deadlocks, use asynchronous read operations on at least one of the streams.
// Do not perform a synchronous read to the end of both redirected streams.
using (this.executingProcess = this.GetGitProcess(command, workingDirectory, dotGitDirectory, useReadObjectHook, redirectStandardError: true, gitObjectsDirectory: gitObjectsDirectory))
using (this.executingProcess = this.GetGitProcess(
command,
workingDirectory,
dotGitDirectory,
fetchMissingObjects: useReadObjectHook,
redirectStandardError: true,
gitObjectsDirectory: gitObjectsDirectory))
{
StringBuilder output = new StringBuilder();
StringBuilder errors = new StringBuilder();
Expand Down
5 changes: 0 additions & 5 deletions Scalar.Common/ScalarPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,6 @@ public abstract class ScalarPlatformConstants
/// </summary>
public abstract HashSet<string> UpgradeBlockingProcesses { get; }

public string ScalarReadObjectHookExecutableName
{
get { return "Scalar.ReadObjectHook" + this.ExecutableExtension; }
}

public string MountExecutableName
{
get { return "Scalar.Mount" + this.ExecutableExtension; }
Expand Down
13 changes: 0 additions & 13 deletions Scalar.FunctionalTests/Tests/EnlistmentPerFixture/MountTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,6 @@ public void MountFailsOutsideEnlistment()
this.MountShouldFail("is not a valid Scalar enlistment", Path.GetDirectoryName(this.Enlistment.EnlistmentRoot));
}

[TestCase]
public void MountCopiesMissingReadObjectHook()
{
this.Enlistment.UnmountScalar();

string readObjectPath = this.Enlistment.GetSourcePath(".git", "hooks", "read-object" + Settings.Default.BinaryFileNameExtension);
readObjectPath.ShouldBeAFile(this.fileSystem);
this.fileSystem.DeleteFile(readObjectPath);
readObjectPath.ShouldNotExistOnDisk(this.fileSystem);
this.Enlistment.MountScalar();
readObjectPath.ShouldBeAFile(this.fileSystem);
}

[TestCase]
public void MountSetsCoreHooksPath()
{
Expand Down
5 changes: 0 additions & 5 deletions Scalar.Installer.Windows/Setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#define ServiceDir BuildOutputDir + "\Scalar.Service.Windows\bin\" + PlatformAndConfiguration
#define ServiceUIDir BuildOutputDir + "\Scalar.Service.UI\bin\" + PlatformAndConfiguration
#define ScalarMountDir BuildOutputDir + "\Scalar.Mount.Windows\bin\" + PlatformAndConfiguration
#define ReadObjectDir BuildOutputDir + "\Scalar.ReadObjectHook.Windows\bin\" + PlatformAndConfiguration
#define ScalarUpgraderDir BuildOutputDir + "\Scalar.Upgrader\bin\" + PlatformAndConfiguration + "\net461"

#define MyAppName "Scalar"
Expand Down Expand Up @@ -78,10 +77,6 @@ DestDir: "{app}"; Flags: ignoreversion; Source:"{#ScalarUpgraderDir}\Scalar.Upgr
DestDir: "{app}"; Flags: ignoreversion; Source:"{#ScalarUpgraderDir}\Scalar.Upgrader.exe"
DestDir: "{app}"; Flags: ignoreversion; Source:"{#ScalarUpgraderDir}\Scalar.Upgrader.exe.config"

; Scalar.ReadObjectHook files
DestDir: "{app}"; Flags: ignoreversion; Source:"{#ReadObjectDir}\Scalar.ReadObjectHook.pdb"
DestDir: "{app}"; Flags: ignoreversion; Source:"{#ReadObjectDir}\Scalar.ReadObjectHook.exe"

; Cpp Dependencies
DestDir: "{app}"; Flags: ignoreversion; Source:"{#VCRuntimeDir}\msvcp140.dll"
DestDir: "{app}"; Flags: ignoreversion; Source:"{#VCRuntimeDir}\msvcp140_1.dll"
Expand Down
1 change: 0 additions & 1 deletion Scalar.Mount/Scalar.Mount.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
<Error Condition="!Exists('..\..\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets'))" />
</Target>
<PropertyGroup>
<PostBuildEvent>xcopy /Y $(BuildOutputDir)\Scalar.ReadObjectHook.Windows\bin\$(Platform)\$(Configuration)\Scalar.ReadObjectHook.* $(TargetDir)</PostBuildEvent>
</PropertyGroup>
<Import Project="..\..\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.linux.targets" Condition="Exists('..\..\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.linux.targets')" />
<Import Project="..\..\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets" Condition="Exists('..\..\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets')" />
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading