Skip to content

Commit 6e00a0f

Browse files
committed
LibGit2RepoInvoker: Test a real SHA1 when initializing
In order to force the LibGit2Repo to load the object store information upon initialization, it does not suffice to use the empty SHA, as that is short-cut somewhere and does not acheive the goals we want. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
1 parent c3213b7 commit 6e00a0f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

GVFS/GVFS.Common/Git/LibGit2RepoInvoker.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ public void InitializeSharedRepo()
7777
{
7878
// Run a test on the shared repo to ensure the object store
7979
// is loaded, as that is what takes a long time with many packs.
80-
this.GetSharedRepo()?.ObjectExists(GVFSConstants.AllZeroSha);
80+
// Using a potentially-real object id is important, as the empty
81+
// SHA will stop early instead of loading the object store.
82+
this.GetSharedRepo()?.ObjectExists("30380be3963a75e4a34e10726795d644659e1129");
8183
}
8284

8385
private LibGit2Repo GetSharedRepo()

0 commit comments

Comments
 (0)