hvrt-vcs / hvrt

Havarti is a Hybrid VCS that works just as well distributed as it does centralized.
BSD Zero Clause License
2 stars 0 forks source link

Havarti

The primary repo for this project is currently hosted on Github. Issues and pull requests can be created there.

WIP:

I have opened up havarti publicly in an incomplete, non-working state. I am starting a new job and thought it best to avoid any potential conficts of interest by allowing this work to be done out in the open. Consequently, Havarti will have lots of rough edges for a while, and I apologize. You are welcome to contribute to get it to a usable state if Havarti's goals align with your own.

What do you do when you take a snapshot? You say "Cheese!"

Havarti is a Hybrid VCS that works both distributed and/or centralized.

git is (as of this writing) the reigning champion of version control systems. It was originally created to meet the needs of the completely distributed development model of the Linux kernel. It is a hairy problem to tackle, and it accomplishes the goal admirably. However, the projects I work on, both professionally and personally, are not like the Linux kernel, and although git comes close to meeting my needs and preferences, it isn't exactly what I want. I've looked into others VCS tools like hg, fossil, and svn, and these do not completely match what I'm looking for either. So I started work on Havarti. It is my own small VCS to meet my preferences and needs (I don't expect it to become widely used like git) . If other people find it useful, great! However, if I'm the only one who ever uses it, that's ok too; I'd still develop it anyway, just for personal experience if nothing else.

When you disemvowel the word Havarti, you are left with hvrt (the name of the tool). We could probably treat it as an acronym, like "Hybrid VCS \<something> \<something>". Let me know if you think of something clever for the last two letters. Regardless, read below to learn some of Havarti's features/goals, roughly in order of priority:

Here is quick comparison of Havarti to Git, Fossil, Mercurial, and Subversion. Havarti's features were chosen primarily because they matter to me. Maybe you value similar features:

Feature Havarti Git Fossil Mercurial Subversion
Explicit File Renames ✔️ ❌¹ ✔️ ✔️
Explicit File Copies ✔️ ❌¹ ✔️ ✔️
Single Binary ✔️ ✔️
Native Cross Platform ✔️ ❕² ✔️ ✔️ ✔️
Commit offline (i.e. distributed) ✔️ ✔️ ✔️ ✔️
Centralized model ✔️ ❕³ ❕⁴ ✔️
Autosync with upstream (configurable) ✔️ ✔️ ✔️⁵
Shallow clone ✔️ ✔️ ✔️ ✔️⁵
Partial clone ✔️ ✔️ ❌⁴ ✔️⁵
Narrow clone/checkout ✔️ ❌⁴ ✔️⁵
Any file size ✔️ ✔️ ✔️ ✔️
History rewriting abilities ✔️ ✔️ ✔️
Discourage unsafe operations ✔️ ✔️ ✔️⁵
Serve content as static website ✔️ ✔️
Bidirectional bridge to git ✔️ ✔️ ✔️
Local webapp issue tracker, forum, etc. ✔️

Footnotes:

  1. Lazily calculated heuristically from tree snapshots. Can be wrong depending on CLI flags passed to git blame and/or amount of file changes between commits.
  2. Windows support via a Posix compatibility layer. Comes bundled with many indirect dependency programs like bash, perl, and curl.
  3. Via shallow clones, partial clones, and extensions.
  4. Via extensions.
  5. All centralized VCS tools have this behavior by design.
  6. Havarti doesn't arbitrarily handicap users. But it doesn't encourage them to do unsafe things either.
  7. https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/