Skip to content

Commit

Permalink
Merge pull request #379: Update Git to v2.27.0
Browse files Browse the repository at this point in the history
See microsoft/git#271.

Updates necessary here:

* The `multi-pack-index` builtin started honoring `repack.packKeptObjects`, which is `false` by default. We want to repack the `.keep` pack because that is just the most-recent prefetch pack-file. We don't expire it, but we want to repack it.

* Upstream now has the `log.excludeDecoration` config option. This allows us to hide the `refs/scalar/hidden/*` refs from the history views, de-cluttering the history for our Scalar enlistments.
  • Loading branch information
derrickstolee authored Jun 2, 2020
2 parents c2ed93b + e4a5cf2 commit f7b0b1d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
VFS for Git (which is less flexible). Only update that version if we rely upon a
new command-line interface in Git or if there is a truly broken interaction.
-->
<GitPackageVersion>2.20200514.1</GitPackageVersion>
<GitPackageVersion>2.20200601.2</GitPackageVersion>
<MinimumGitVersion>v2.25.0.vfs.1.1</MinimumGitVersion>

<WatchmanPackageUrl>https://github.com/facebook/watchman/suites/307436006/artifacts/304557</WatchmanPackageUrl>
Expand Down
2 changes: 1 addition & 1 deletion Scalar.Common/Git/GitProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ public Result MultiPackIndexExpire(string gitObjectDirectory)

public Result MultiPackIndexRepack(string gitObjectDirectory, string batchSize)
{
return this.InvokeGitAgainstDotGitFolder($"-c pack.threads=1 multi-pack-index repack --object-dir=\"{gitObjectDirectory}\" --batch-size={batchSize}");
return this.InvokeGitAgainstDotGitFolder($"-c pack.threads=1 -c repack.packKeptObjects=true multi-pack-index repack --object-dir=\"{gitObjectDirectory}\" --batch-size={batchSize}");
}

public Process GetGitProcess(
Expand Down
1 change: 1 addition & 0 deletions Scalar.Common/Maintenance/ConfigStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public bool TrySetConfig(out string error)
{ "gui.gcwarning", "false" },
{ "index.threads", "true" },
{ "index.version", "4" },
{ "log.excludeDecoration", "refs/scalar/*" },
{ "merge.stat", "false" },
{ "merge.renames", "false" },
{ "pack.useBitmaps", "false" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class PackfileMaintenanceStepTests
private string ExpireCommand => $"multi-pack-index expire --object-dir=\"{this.context.Enlistment.GitObjectsRoot}\"";
private string VerifyCommand => $"-c core.multiPackIndex=true multi-pack-index verify --object-dir=\"{this.context.Enlistment.GitObjectsRoot}\"";
private string WriteCommand => $"-c core.multiPackIndex=true multi-pack-index write --object-dir=\"{this.context.Enlistment.GitObjectsRoot}\"";
private string RepackCommand => $"-c pack.threads=1 multi-pack-index repack --object-dir=\"{this.context.Enlistment.GitObjectsRoot}\" --batch-size=5";
private string RepackCommand => $"-c pack.threads=1 -c repack.packKeptObjects=true multi-pack-index repack --object-dir=\"{this.context.Enlistment.GitObjectsRoot}\" --batch-size=5";

[TestCase]
public void PackfileMaintenanceIgnoreTimeRestriction()
Expand Down

0 comments on commit f7b0b1d

Please sign in to comment.