finds.dev← search

// the find

mojombo/grit

★ 2,026 · Ruby · MIT · updated Aug 2023

**Grit is no longer maintained. Check out libgit2/rugged.** Grit gives you object oriented read/write access to Git repositories via Ruby.

Grit is an abandoned Ruby library for reading and writing Git repositories, built to power early GitHub. It splits work between shelling out to the system `git` binary and a partial pure-Ruby reimplementation of Git internals. The maintainers themselves tell you to use rugged instead.

- The object model is clean and navigable — Repo, Commit, Tree, Blob, Tag map directly to Git concepts and the traversal API reads naturally.

- Includes a full embedded .git fixture in the test suite, which is a solid approach for testing git-reading code without side effects.

- The pure-Ruby pack file reader (lib/grit/git-ruby/internal/pack.rb) is legitimately interesting as a reference for how Git stores objects — worth reading if you want to understand the format.

- Dead. The README says so on line one. Rugged (libgit2 bindings) is the maintained successor and handles the same use cases without shelling out.

- The shell-out strategy means every call forks a process — fine for one-offs, terrible for anything that iterates over commits or blobs at scale, which is most real use cases.

- Ruby version compatibility is unknown and almost certainly broken on modern Ruby — no CI, no maintainer, no updates since the repo was archived in spirit.

- The pure-Ruby Git reimplementation only covers a subset of operations, so you get an inconsistent surface: some things go through the binary, others through the Ruby code, and it's not always obvious which path you're on.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →