Skip to content

Remove _ensure_git_installed function and its calls#8

Merged
BillJr99 merged 1 commit into
mainfrom
claude/admiring-newton-FuK5K-remove-git-jit
May 25, 2026
Merged

Remove _ensure_git_installed function and its calls#8
BillJr99 merged 1 commit into
mainfrom
claude/admiring-newton-FuK5K-remove-git-jit

Conversation

@BillJr99
Copy link
Copy Markdown
Owner

Summary

Removes the _ensure_git_installed() function and all its call sites. This function attempted to automatically install git via apt-get if it wasn't found on PATH, but this functionality is no longer needed.

Changes

  • server.py: Removed _ensure_git_installed() function that checked for git availability and attempted automatic installation via apt-get
  • server.py: Removed the call to _ensure_git_installed() from materialize_repository()
  • frontend/app.py: Removed the import and call to _ensure_git_installed() from clone_and_build()
  • tests/test_server.py: Removed the TestEnsureGitInstalled test class containing three test cases

Rationale

The automatic git installation logic is no longer necessary, likely because:

  • Git is now guaranteed to be available in the deployment environment (e.g., via Docker image)
  • The function added complexity without providing significant value in modern deployment scenarios
  • Removing it simplifies the codebase and eliminates unnecessary subprocess calls

The code now assumes git is already installed and available on PATH when repository operations are needed.

https://claude.ai/code/session_01R2Vi6NE4wGxwv6rZ2HEXji

The Dockerfile already installs git as part of the base image build,
so the runtime apt-get fallback in _ensure_git_installed is dead code.
Remove the helper and its callers in materialize_repository and the
/api/clone-and-build endpoint.
@BillJr99 BillJr99 merged commit 9d45c83 into main May 25, 2026
2 checks passed
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