You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting from the repository root directory to the .git directory is not trivial since .git can be both a folder or a file referencing a folder.
This logic is already implemented in go-git (https://github.com/go-git/go-git/blob/master/repository.go#L332-L417 )but not available as public API.
My suggestion would be to extend the Repository API to provide a DotGit() string function that returns the folder to the .git folder of the current repository.
The text was updated successfully, but these errors were encountered:
@datosh this could be a new Interface that the supporting Storage.Storers could implement. But I am assuming this would only be needed for filesystem though.
Note that if you are using BoundOS it may be slightly easier to have a direct translation of the path.
Currently
go-git
only provides a public API to get the location of the git root folder via:Getting from the repository root directory to the
.git
directory is not trivial since.git
can be both a folder or a file referencing a folder.This logic is already implemented in
go-git
(https://github.com/go-git/go-git/blob/master/repository.go#L332-L417 )but not available as public API.My suggestion would be to extend the
Repository
API to provide aDotGit() string
function that returns the folder to the.git
folder of the current repository.The text was updated successfully, but these errors were encountered: