Closed leonardochaia closed 2 years ago
On macOS, $TMPDIR
is somewhere in /var/folders
(with a per-user obscure name), but /var
is a symlink to /private/var
.
libgit2 is returning the canonicalized path. I honestly don't remember why we do that, offhand, but those are two paths that point to the same place.
Thanks @ethomson , I understand what's going on.
I guess I have a bigger problem than I thought: symlinks :sob:
Hi all, we are using lib2gitsharp in dotnet-affected, a tool to detect which projects are affected by a set of changes.
I am not sure if this is a MacOS thing, or expected behavior. I couldn't find any related Issue or StackOverflow post.
Reproduction steps
Creating a new repository in MacOS using
Repository.Init
is prefixing a/private
folder.logs:
Link to complete reproduction example
Link to build results passing on Windows and ubuntu, but not MacOS
Expected behavior
When using
var repo = new Repository(workingDirectoryPath)
on MacOs, I would expectrepo.Info.WorkingDirectory
to equal the receivedworkingDirectoryPath
.Actual behavior
When using
var repo = new Repository(workingDirectoryPath)
on MacOS,repo.Info.WorkingDirectory
does not equal the providedworkingDirectoryPath
.Under Windows and Linux the same path is returned.
Version of LibGit2Sharp (release number or SHA1)
0.27.0-preview-0175
Operating system(s) tested; .NET runtime tested
All tests performed against
netcoreapp3.1
,net5.0
andnet6.0
.MacOS 11.6.4
Ubuntu 20.04.3
Microsoft Windows Server 2022 10.0.203