4
4
Fork
You've already forked git-collab
0
Adds collaboration functionality to git, using git's internal data storage.
git
  • Zig 100%
2026年04月10日 19:33:32 -07:00
src implement git protocol v2 and ls-refs command 2026年04月10日 19:33:32 -07:00
.gitignore hello world 2026年04月06日 14:16:59 -07:00
build.zig hello world 2026年04月06日 14:16:59 -07:00
build.zig.zon implement git protocol v2 and ls-refs command 2026年04月10日 19:33:32 -07:00
README.md readme: fix grammar 2026年04月07日 05:03:38 -07:00
TODO two more todo items 2026年04月07日 05:06:22 -07:00

git-collab

Adds collaboration functionality to git, using git's internal data storage.

Current Status

Vaporware... nothing but a dream.

The Dream

  • Issue tracking
    • Supports comments, attached media, editing, labels, milestones
    • Quick and robust search
  • Merge request queue
    • Merge requests are issues with some extra fields.
    • Git server allows users to push to a branch prefixed by public key fingerprints which have permission based on the invitation tree.
    • Ability to disable "drafts"
    • Ability to set cap on how many open PRs a contributor can have at once
  • Identity management and moderation
    • Based on public/private key encryption
    • Invitation tree
  • Continuous Integration
    • Self-hosted runner orchestration
    • Flexible priority system for when resources are limited.
    • ZON format for configuration
    • Configuration outside of the main source tree
  • Web User Interface
    • Intentionally lacks file browser to prevent abuse. Git protocol is superior to rendering source code via HTTP.
    • Users sign in with their public keys.

Everything can be done via web UI or terminal UI. The data is stored via git objects, so there is no external dependency on a database or software-as-a-service. Just like source files in Git, everything can be edited locally, offline, and synchronized in a decentralized manner.

Importing/exporting to/from third-party issue trackers is out of scope.

Installation

The project compiles into a single executable, as statically linked as possible, with no dependencies. Installation is therefore as simple as copying a single file to the server where it should run. Nothing else needs to be installed.

The same executable can also make a computer into a CI worker.

Building from Source

zig build

Data Layout

"lamport" is a logical clock that starts at 0.

When appending data, the lamport timestamp is the highest timestamp across the whole database plus one.

Root

Global settings.

refs/root -> first commit

  • commit
    • tree
      • <lamport>-admin_add-<id-sha1> -> empty blob (optional)
        • each one points to refs/identities/<id-sha1>, adding a root user.
      • <lamport>-admin_del-<id-sha1> -> empty blob (optional)
        • each one points to refs/identities/<id-sha1>, removing a root user.
    • next commit

Identities

This is also where the invitation tree data is stored. Non-vouched and denounced identities receive permission denied errors when trying to interact with the service.

refs/identities/<sha1> -> first commit

This sha1 is used as the stable identity identifier.

  • commit
    • tree
      • <lamport>-info -> blob (optional)
        • updates user info
      • <lamport>-profile -> blob (optional)
        • updates the profile markdown file
      • <lamport>-avatar -> blob (optional)
        • updates the avatar image. file can have any extension.
      • <lamport>-key_add -> pubkey blob (optional)
        • adds another public key to the user
      • <lamport>-key_del-<blob-id> -> empty blob (optional)
        • removes a public key from the user
      • <lamport>-vouch-<voucher-id-sha1> -> blob (optional)
        • the blob is vouch comment, can be empty
      • <lamport>-denounce-<voucher-id-sha1> -> blob (optional)
        • the blob is denounce comment, can be empty
    • next commit

"info" is a file, like this, all fields optional:

name: Andrew Kelley
mail: andrew@ziglang.org
slug: andrewrk

Multiple mail allowed.

Issues

refs/issues/<sha1> -> first commit

This sha1 is used as the stable issue identifier.

  • commit
    • tree
      • <lamport>-content -> blob (optional)
        • each one is an edit of the issue
      • <lamport>-comment_add -> blob (optional)
        • each one is an added comment
      • <lamport>-comment_del-<commit sha1> -> empty blob (optional)
        • each one is a deleted comment
      • <lamport>-label_add-<label id> -> empty blob (optional)
        • each one is an added label
      • <lamport>-label_del-<label id> -> empty blob (optional)
        • each one is a deleted label
      • <lamport>-milestone-<milestone id> -> empty blob (optional)
        • sets the milestone
      • media -> tree (optional)
        • provides the files referenced by comments or content in this commit
    • next commit

"content" blobs look like this:

author: <author id sha1>
subject: title as a string, ending with newline
body content after a blank line

"comment_add" blobs look like this:

author: <author id sha1>
body content after a blank line