LibGit2 question

If you only want to use LibGit2 in order not to rely on an external git being available on the system, you might prefer to use the Git package instead:

using Git
git = Git.git()
staged_files = readlines(`$git diff --name-only --cached`)

Whether it can be done with LibGit2 I have no idea though.

2 Likes