我在 git_revwalk_new/git_revwalk_push 中找不到任何指定文件名的选项,那么如何检索指定文件的所有修订版本?
最佳答案
您应该能够从 log.c example 中找到灵感在 libgit2 中。
更准确地说,您需要正常执行 revwalk,并且 perform the path filtering使用git_pathspec_match_tree在每个提交的树上。
关于libgit2 - 如何使用libgit2运行 "git log filename"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50112803/