在freenode上的#libgit2中由cmn_回答:
<cmn_> shurcooL: you're right, I was thinking of git_repository_discover() <cmn_> which *will* take any of those paths and give you the right one <cmn_> shurcooL: what you usually call a "git repository" is two things, the gitdir and the worktree; the worktree is where you files live (and the top-level has the .git), and the gitdir is where git stores its data <cmn_> what it's telling you is that if you have someproject/ and someproject/.git you can pass either of those paths and libgit2 will load the repository; the former being the worktree/workdir and the latter the repository
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句