fork-dev / Tracker

Bug and issue tracker for Fork for Mac
494 stars 12 forks source link

Commit info is missing when using Microsoft git & Scalar #2042

Open miku1958 opened 5 months ago

miku1958 commented 5 months ago

The commit list is missing names and authors of all the commits

image

But I can view the detail by clicking the commit

Open ~/Library/Logs/Fork.log and it shows the following error when scrolling through the list:

[BtResultExtensions.swift:33] > Bt error:
Failed to find object

This only happens in a git repo using Microsoft git & Scalar and Fork 2.38, Fork 2.36.2 is working fine.

DanPristupov commented 5 months ago

Never heard about Microsoft git and Scalar, reading about them now.

As for now, use Fork 2.37: https://cdn.fork.dev/mac/Fork-2.37.dmg

miku1958 commented 5 months ago

It used to be called git vfs. If I'm not mistaken, the new fork will read the objects under .git/objects directly, but ms git will leave the objects to be managed by scalar, which will be under .scalarCache. you can use git config --local gvfs.sharedCache to read to actual path. But this is not safe anyway.

DanPristupov commented 5 months ago

Thank you very much for the details.

I'm trying to reproduce the problem, but haven't succeed yet.

I installed https://github.com/microsoft/git/releases/tag/v2.43.0.vfs.0.0 to a test Windows Virtual Machine (the OS shouldn't make any difference).

I cloned some random repository using scalar clone command. I turned out that gvfs.sharedCache is not enabled by default, so I configured that.

scalar clone --no-src https://github.com/microsoft/api-guidelines scalar-api-guidelines
cd scalar-api-guidelines
git config --local gvfs.sharedCache 'c:\temp\scalar-cache'
scalar run fetch

ls 'c:\temp\scalar-cache\pack' shows it's not empty, but Fork still opens the repo without a problem. I need to make an object to exist only in the shared cache, somehow.

I tried to add --local-cache-path=path/to/cache to clone, but it makes no difference (https://github.com/microsoft/git/blob/f8d3c9dc34b89a13f7bdcc533cb664e1c5e74d27/Documentation/scalar.txt#L93C15-L93C15)

Output of scalar diagnose:

$ scalar diagnose
Collecting diagnostic info

git version 2.43.0.vfs.0.0
cpu: x86_64
built from commit: b7a6ed788a205fb2c0013111d277b4c9d6ab35bd
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
Repository root: C:/temp/scalar-api-guidelines
Cache Server: None
Local Cache: c:\temp\scalar-cache

Available space on 'C:/': 179.15 GiB

Diagnostics complete.
All of the gathered info is captured in 'C:/temp/scalar-api-guidelines/.scalarDiagnostics/git-diagnostics-20240115_105940.zip'

Diagnostics complete.
All of the gathered info is captured in 'C:/temp/scalar-api-guidelines/.scalarDiagnostics/git-diagnostics-20240115_105940.zip'
miku1958 commented 5 months ago

I don't know how to configure a scalar repo。Also I am using mac