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
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,13 @@ private void PostFetchJobShouldComplete()
ProcessResult midxResult = GitProcess.InvokeProcess(this.Enlistment.RepoRoot, "multi-pack-index verify --object-dir=\"" + objectDir + "\"");
midxResult.ExitCode.ShouldEqual(0);

ProcessResult graphResult = GitProcess.InvokeProcess(this.Enlistment.RepoRoot, "commit-graph read --object-dir=\"" + objectDir + "\"");
graphResult.ExitCode.ShouldEqual(0);
graphResult.Output.ShouldContain("43475048"); // Header from commit-graph file.
// A commit graph is not always generated, but if it is, then we want to ensure it is in a good state
if (this.fileSystem.FileExists(Path.Combine(objectDir, "info", "commit-graph")))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could include a comment about why this is a conditional check... maybe something along the lines of:

// A commit graph is not always generated, but if it is, then we want to ensure it is in a good state

To indicate to readers why the check is conditional

{
ProcessResult graphResult = GitProcess.InvokeProcess(this.Enlistment.RepoRoot, "commit-graph read --object-dir=\"" + objectDir + "\"");
graphResult.ExitCode.ShouldEqual(0);
graphResult.Output.ShouldContain("43475048"); // Header from commit-graph file.
}
}
}
}