# Furgit [![builds.sr.ht status](https://builds.sr.ht/~runxiyu/furgit.svg)](https://builds.sr.ht/~runxiyu/furgit?) [![Go Reference](https://pkg.go.dev/badge/git.sr.ht/~runxiyu/furgit.svg)](https://pkg.go.dev/git.sr.ht/~runxiyu/furgit) Furgit is a fast implementation of Git in pure Go, extracted from [an internal package of Lindenii Villosa](https://codeberg.org/lindenii/villosa/src/branch/master/villosad/internal/common/git). Furgit is in initial development, does not have tagged releases yet, and we can guarantee that the API will break every now and then. Do not use in production. We do not focus on command-line utilities; in particular, Furgit does not intend to replace [upstream git](https://git-scm.com). It is intended to be used as a library. ## Features Currently, furgit is very basic; it supports reading and writing loose objects and reading from packfiles. There is some infrastructure for writing packfiles in the tests but they need to be refactored. We intend for repository objects to be freely usable across goroutines, which may enable long-running applications such as forges to keep a pool of recently used repos (including their `.idx` and `.pack` cache) for rapid access. We currently do not intend to support flexible storage backends such as [storers in go-git](https://pkg.go.dev/github.com/go-git/go-git/v5/plumbing/storer); a standard UNIX-like filesystem with [syscall.Mmap](https://pkg.go.dev/syscall#Mmap) is expected. ## Performance Furgit is aggressively optimized for performance. [As of November 2025](https://git.sr.ht/~runxiyu/gitbench), for the task of `git ls-tree --long HEAD` on large repos such as [Linux](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git), it is: * approximately the same performance as [upstream git](https://git-scm.com), * approximately 10 times faster than [libgit2](https://libgit2.org), and * approximately 1000 times faster than [go-git](https://github.com/go-git/go-git). ## Hash algorithm Furgit uses SHA-256 by default. To switch to SHA-1, use the `sha1` build tag. There will be future research to investigate potentially supporting both algorithms in one build of the library (likely heavily using generics). ## Development * [Main SourceHut repository](https://git.sr.ht/~runxiyu/furgit) and [public inbox](https://lists.sr.ht/~runxiyu/public-inbox) for [patches](https://git-send-email.io/) and discussions * [Codeberg](https://codeberg.org/runxiyu/furgit) (issues and pulls are welcome here too) * [tangled](https://tangled.org/@runxiyu.tngl.sh/furgit) (issues and pulls are welcome here too) * [GitHub](https://github.com/runxiyu/furgit) (issues and PRs are welcome here too) * `#chat` on [irc.runxiyu.org](https://irc.runxiyu.org) ([web chat](https://webirc.runxiyu.org/kiwiirc/#chat)) ## Etymology I was thinking of names and I accidentally typed "git" as "fur" (i.e., left shifted one key on my QWERTY keyboard). ## License This project is licensed under the GNU Affero General Public License, Version 3.0 only. Pursuant to Section 14 of the GNU Affero General Public License, Version 3.0, [Runxi Yu](https://runxiyu.org) is hereby designated as the proxy who is authorized to issue a public statement accepting any future version of the GNU Affero General Public License for use with this Program. Therefore, notwithstanding the specification that this Program is licensed under the GNU Affero General Public License, Version 3.0 only, a public acceptance by the Designated Proxy of any subsequent version of the GNU Affero General Public License shall permanently authorize the use of that accepted version for this Program. For the purposes of the Developer Certificate of Origin, the "open source license" refers to the GNU Affero General Public License, Version 3.0, with the above proxy designation pursuant to Section 14. All contributors are required to "sign-off" their commits (using `git commit -s`) to indicate that they have agreed to the [Developer Certificate of Origin](https://developercertificate.org), reproduced below. ``` Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 1 Letterman Drive Suite D4700 San Francisco, CA, 94129 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ```