Skip to content
This repository was archived by the owner on Jul 21, 2026. It is now read-only.

git: provide version control and HTTP transport - #19

Merged
brandonpayton merged 1 commit into
mainfrom
migrate/git-cli
Jul 17, 2026
Merged

git: provide version control and HTTP transport#19
brandonpayton merged 1 commit into
mainfrom
migrate/git-cli

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jul 11, 2026

Copy link
Copy Markdown
Member

Why

Kandelo users and package builds need real Git workflows from Homebrew instead of Kandelo registry archives or a reduced wrapper. Git is both a user tool and infrastructure for development workflows, so the Formula must exercise its normal helper programs, shell, pager, editor, templates, cloning, and network transport. Hiding any of those paths would hide platform failures.

All required source Formulae are now on the default tap, including Vim. This PR can therefore land as source while bottle publication continues dependency-first.

What changed

  • Build Git 2.47.1 from the exact kernel.org source with the Kandelo SDK.
  • Install git, upload/receive aliases, HTTP/HTTPS/FTP remote helpers, envsubst, the supported shell commands and libraries, mergetool resources, templates, and the matching upstream manpages.
  • Declare the complete runtime dependency set: Coreutils, Dash, Diffutils, Grep, Less, Libcurl, OpenSSL, Sed, Vim, and Zlib.
  • Compile Git's helper and template locations to stable guest opt/git paths, then test those compiled paths without overriding GIT_EXEC_PATH or GIT_TEMPLATE_DIR.
  • Separate the native build shell from Git's recorded guest Dash path through a narrow upstream Makefile portability patch.
  • Fork-instrument and validate all three linked Wasm programs.
  • Disable optional Perl, Python, Tcl/Tk, gettext, Expat, and WebDAV executables that this Formula does not ship.
  • Define tests for repository creation, commits, local cloning, submodules, nested shell aliases, Less pagination, mergetool discovery, the full Vim editor runtime, envsubst, remote-helper capabilities, and HTTPS transport.

The original nine feature/fixup commits are folded into one purpose-led commit. Subsequent review fixups make the two skip_clean helper paths literal, declare exact helper-process counts, and satisfy the pinned Homebrew style rules. These fixups do not change package output behavior; the process counts strengthen test completion evidence.

This PR contains no bottle block, archive, sidecar, receipt, generated Wasm artifact, platform change, or Kandelo ABI change.

Exact source state

  • Tap base: ed5dfe7d0cacc5209e325351e480809221b0cafa
  • Exact PR head: 4eee208f8d595d2049c657fe548daf9a778a7ebf
  • Exact PR tree: 5419da213a1c6a3a02124982d5c9fa1814a1fd7d
  • Formula blob: 3ceb132696322776fc17255dbd3ad416b7b05c25
  • Formula SHA-256: 171bb610c560d6fc01c89e5658a3312138858f50d0b922f9602cbecff6b36680
  • Formula-only stable patch ID: 9c454762625d2e4f5cf44e802f7c37ab1526e18d
  • Author: Brandon Payton

The branch now rests on merged PTY descendant support. The final Formula change declares the audited helper counts for Less pagination (1), mergetool discovery (4), and Vim editing (1), so those interactive tests cannot pass while helpers are still running.

Evidence

Fresh checks on this exact head passed:

  • Ruby syntax for Formula/git.rb
  • Formula style under the publisher's pinned Homebrew 34c40c18ffa2029b611b61c73273e32c003d0842
  • tap trust parser and wrapper
  • all 17 shared Formula-support Node tests, including PTY descendant tracking and timeout behavior
  • canonical Formula source-closure validation through scripts/dev-shell.sh
  • direct runtime closure: exactly the ten dependencies listed above
  • full runtime closure: those ten plus transitive Ed, Libcxx, and Ncurses
  • git diff --check

The fresh source-closure check reverified the exact Git source archive SHA-256 f3d8f9bb23ae392374e91cd9d395970dabc5b9c5ee72f39884613cd84a6ed310, the exact matching manpage archive SHA-256 ffc2005a89b056c0727b667f6beda0068371619762ea4844ad0229091befee13, required source and manpage members, and clean application of the embedded patch. Earlier audits also verified safe archive members and the delivered source licenses.

Fresh exact-head self/devil review accepted the Formula semantics, dependency closure, source and patch provenance, helper counts, scope, and Brandon Payton attribution. No current ABI 41 Git source build, Formula run, bottle, stock Homebrew pour, Node.js run, Chromium run, or in-guest install is claimed here.

Platform and publication gates

The POSIX, SDK, continuation-capacity, process, and publisher changes that blocked the old ABI 39 branch are now in merged ABI 41 Kandelo. That removes the source-merge blocker; the trusted publisher must still build this exact merged Formula and prove the mergetool, editor, clone, and HTTPS tests on ABI 41.

All thirteen Formulae in Git's full source closure are on tap main. Their ABI 41 bottles are not all published yet. Publication must consume public dependency bottles through the normal Homebrew path and must not fall back to Kandelo registry archives or ambient source builds.

The current critical path remains the four pilot bottles, then the Libmagic/File VFS closure. Git is a later leaf package. When its dependency bottles are ready, Git must pass public GHCR readback, stock Homebrew pour, and its real installed workflows before it is used as migration evidence.

@brandonpayton

Copy link
Copy Markdown
Member Author

Independent devil's-advocate review completed against original head 0c97e68; corrections are pushed in f83dd30.

Review findings fixed in the tap:

  • restored the normal Git command/resource surface instead of shipping only git and git-remote-http;
  • added the missing git-upload-pack/receive aliases, with an exact file:// clone test;
  • added and tested git-sh-i18n--envsubst, shell command dispatch, and nested Git/Dash re-exec;
  • declared Coreutils, grep, and sed as direct script-runtime dependencies;
  • separated target CLI opt/bin paths from host build-tool PATH;
  • moved internal executable and non-executable resources to libexec/git-core, satisfying strict audit;
  • removed embedded-patch whitespace.

Exact final source build and literal Homebrew test pass. Ruby syntax, style, strict online audit, diff --check, and fork-artifact guards pass.

Do not merge yet. The full upstream git mergetool --tool-help path revealed a main-platform ABI/layout blocker. Four nested Dash unwinds require 17,420, 17,444, 17,260, and 17,284 bytes against the 16,384-byte fork buffer, then trap during child replay. The preceding cursor is 15,472 bytes. This is the fixed continuation-buffer limit tracked by Automattic/kandelo#845, not a formula defect; #845 detects it but does not grow the buffer. Growing it requires a deliberate ABI/layout change and rebuilt artifacts after ABI 18. The PR body now records the evidence and gate.

@brandonpayton
brandonpayton force-pushed the migrate/git-cli branch 2 times, most recently from cbdfc94 to 892ed65 Compare July 12, 2026 08:57
@brandonpayton
brandonpayton changed the base branch from main to migrate/coreutils-cli July 12, 2026 08:57
@brandonpayton
brandonpayton force-pushed the migrate/coreutils-cli branch 4 times, most recently from b7f4ed8 to e8c3f61 Compare July 12, 2026 20:50
@brandonpayton
brandonpayton changed the base branch from migrate/coreutils-cli to main July 13, 2026 03:29
@brandonpayton

Copy link
Copy Markdown
Member Author

Devil's-advocate audit found and fixed a masked compiled-path bug in 700c1f6b9543c77516b9e9dab5c9f0de1c33c5bc.

uname_S=Wasm32 does not enable upstream Git's RUNTIME_PREFIX. With the default relative template_dir=share/git-core/templates, Git therefore resolved templates through its compiled fallback prefix as /home/linuxbrew/.linuxbrew/share/git-core/templates, while the Formula's installed/staged contract is /home/linuxbrew/.linuxbrew/opt/git/share/git-core/templates. The old test supplied GIT_TEMPLATE_DIR, so it could not detect the mismatch.

The Formula now passes the stable guest opt/git template path to Make, removes both path environment overrides, and gives Git its real guest argv[0]. A dev-shell Make dry run confirms the resulting exact DEFAULT_GIT_TEMPLATE_DIR definition, and git init remains the runtime regression once the final ABI/dependency bottles are available.

This review does not claim a fresh source build, bottle, stock-Homebrew pour, Node run, or Chromium run for the changed head; those remain explicit platform and publisher gates in the PR body.

@brandonpayton brandonpayton changed the title git: add native version control and HTTP transport git: provide version control and HTTP transport Jul 17, 2026
Kandelo users and package builds need real Git workflows from Homebrew instead of registry artifacts or reduced wrappers. Git must exercise its normal helper, shell, pager, editor, template, clone, and network paths so platform gaps remain visible.

Build Git 2.47.1 through the Kandelo SDK, install its reviewed runtime and documentation surface, declare the complete target dependency closure, instrument every linked Wasm program, and test repository, child-process, editor, pager, clone, and HTTPS behavior.
@brandonpayton
brandonpayton merged commit 49635b7 into main Jul 17, 2026
2 checks passed
@brandonpayton
brandonpayton deleted the migrate/git-cli branch July 17, 2026 06:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant