Skip to content

feat(installer): do shallow clones - #39423

Merged
teknium1 merged 1 commit into
mainfrom
ethie/shallow-clone-installer
Jun 5, 2026
Merged

feat(installer): do shallow clones#39423
teknium1 merged 1 commit into
mainfrom
ethie/shallow-clone-installer

Conversation

@ethernet8023

@ethernet8023 ethernet8023 commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

The installer scripts (install.sh and install.ps1) currently do full clones of the hermes-agent repo, pulling the entire history. For a one-shot install that just needs the latest files on a given branch, this is unnecessary — it wastes bandwidth and makes the clone noticeably slower on large repos.

This PR adds --depth 1 to all four git clone invocations (SSH + HTTPS in both scripts) so the installer only fetches the tip of the branch. This is safe because:

  • The installer never pushes back to the cloned repo — it's read-only.
  • Post-clone steps (checkout, setup) only need the working tree, not history.
  • git pull inside the install dir will still work (Git auto-expands the shallow boundary on pull).

Related Issue

Fixes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • scripts/install.sh: Added --depth 1 to both SSH and HTTPS git clone commands
  • scripts/install.ps1: Added --depth 1 to both SSH and HTTPS git clone commands

How to Test

  1. Run scripts/install.sh on a Linux/macOS machine — verify it clones successfully and the installed dir has the expected files
  2. Run scripts/install.ps1 on a Windows machine — verify same
  3. Confirm the cloned .git directory is shallow: git -C <install-dir> rev-list --count HEAD should return 1

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: NixOS (Linux)

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

N/A — no visual changes.

Infographic

Shallow clones — faster install

no need to get the whole repo history :)
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: ethie/shallow-clone-installer vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9840 on HEAD, 9840 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5102 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@ethernet8023
ethernet8023 requested a review from teknium1 June 5, 2026 00:42
@teknium1
teknium1 merged commit 36f1cd7 into main Jun 5, 2026
20 checks passed
@teknium1
teknium1 deleted the ethie/shallow-clone-installer branch June 5, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants