libgit2 / libgit2sharp

Git + .NET = ❤
http://libgit2.github.com
MIT License
3.13k stars 879 forks source link

Project roots seems not correct when using google repo #2002

Closed zwbuptgithub closed 1 year ago

zwbuptgithub commented 1 year ago

You are opening a bug report against the LibGit2Sharp project: we use GitHub Issues for tracking bug reports and feature requests. If you have a question about an API or usage, please ask on StackOverflow: http://stackoverflow.com/questions/tagged/libgit2sharp.

Otherwise, to report a bug, please fill out the reproduction steps (below) and delete these introductory paragraphs. Thanks!

Reproduction steps

check out a project using google repo using repo sync instead of git clone, then the .git directory is not in ./my_project/.git directory but in .repo\projects\my_project\my_project.git and run dotnet publish .\project_CLI

Expected behavior

INFO [12/01/22 17:39:09:08] Working directory: D:\dev\my_project\project_CLI INFO [12/01/22 17:39:09:11] Project root is: D:\dev\my_project\project_CLI INFO [12/01/22 17:39:09:11] DotGit directory is: D:\dev\ .repo\projects\my_project\my_project.git

Actual behavior

INFO [12/01/22 17:39:09:08] Working directory: D:\dev\my_project\project_CLI INFO [12/01/22 17:39:09:11] Project root is: D:\dev\ .repo\projects\my_project INFO [12/01/22 17:39:09:11] DotGit directory is: D:\dev\ .repo\projects\my_project\my_project.git

Version of LibGit2Sharp (release number or SHA1)

Operating system(s) tested; .NET runtime tested

zwbuptgithub commented 1 year ago

seems a bug in GitVersion