Commit Graph

3 Commits

Author SHA1 Message Date
autofix-ci[bot]
61fb05a7c8 [autofix.ci] apply automated fixes 2025-08-12 00:28:54 +00:00
Claude
a3f269b13a Add resetOutputFlags for proper output handling
Added missing resetOutputFlags function to GitCommandRunner to properly set
output reader flags before starting, matching LifecycleScriptSubprocess behavior.
This ensures correct handling of nonblocking I/O and socket flags.

Also updated test to use smaller repository to avoid timeouts.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 00:17:35 +02:00
Claude
04d498cfc4 Refactor git operations from blocking to async event loop
This PR refactors git operations in `bun install` from blocking threadpool calls using `std.process.Child` to non-blocking event loop integration using `bun.spawn`.

## Changes

- Created `GitCommandRunner` for async git command execution with event loop integration
- Replaced blocking `fork()` calls with async `bun.spawn`
- Implemented proper two-phase checkout (clone --no-checkout, then checkout)
- Moved post-checkout operations (.git deletion, .bun-tag creation) to appropriate places
- Fixed argv construction to use "git" instead of hardcoded paths
- Added comprehensive tests for git dependencies

## Technical Details

The new implementation:
- Uses tagged pointer unions for process exit handlers
- Properly manages pending task counting for event loop
- Handles both clone and checkout operations asynchronously
- Maintains backward compatibility with existing URL handling

All git operations now integrate properly with Bun's event loop, eliminating blocking operations and improving performance.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 00:10:29 +02:00