cake-contrib / Cake_Git

Cake AddIn that extends Cake with Git features using LibGit2 and LibGit2Sharp
https://cakebuild.net/extensions/cake-git
Other
39 stars 63 forks source link

`GitLogTip` only works in git repo's root #163

Closed lonix1 closed 2 years ago

lonix1 commented 2 years ago

GitLogTip("myrepo/") - OK

GitLogTip("myrepo/foo/src")

Error: Path '/home/username/myrepo/foo/src' doesn't point at a valid Git repository or workdir.

Although that is a valid git repo - technically the git commands should work at any level within the repo. So I was expecting the same would be done by this addin.

The code looks as if it does some tree traversal, so maybe the basic functionality is already there?

lonix1 commented 2 years ago

GitFindRootFromPath(DirectoryPath)