Skip to content

Migrate content system to git-warp native API #284

@flyingrobots

Description

@flyingrobots

Summary

Replace the shell-out content-on-node implementation (execFileSync to git hash-object / git cat-file) with git-warp's native content API (patch.attachContent(), graph.getContent(), graph.getContentOid()).

Motivation

  • git-warp v11.5.0 ships a native content API with GC protection, async persistence, and no subprocess overhead
  • The current src/content.js shells out to git directly — redundant plumbing
  • Clean break, major version bump to 4.0.0

Property Key Change

Old New
_content.sha (string OID) _content (WARP's CONTENT_PROPERTY_KEY)
_content.mime unchanged
_content.size unchanged

What Gets Removed

  • execFileSync calls in content.js
  • PREFIX, KEYS, SHA_RE, assertValidSha() helpers
  • Integrity re-hash in readContent() (git CAS guarantees integrity)
  • cwd parameter on writeContent and readContent

Files Modified

  • src/content.js — rewrite internals
  • src/cli/commands.js — drop cwd from 2 call sites
  • test/content.test.js — update calls and property keys, remove integrity test
  • package.json — bump to 4.0.0
  • ROADMAP.md — update property reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions