Skip to content

fix(git): increase commit timeout for slow pre-commit hooks#1330

Open
C-W-D-Harshit wants to merge 1 commit intopingdotgg:mainfrom
C-W-D-Harshit:fix/git-commit-timeout
Open

fix(git): increase commit timeout for slow pre-commit hooks#1330
C-W-D-Harshit wants to merge 1 commit intopingdotgg:mainfrom
C-W-D-Harshit:fix/git-commit-timeout

Conversation

@C-W-D-Harshit
Copy link

@C-W-D-Harshit C-W-D-Harshit commented Mar 23, 2026

What Changed

Increased the git commit command timeout from 30s to 120s.

Why

Repositories with slow pre-commit hooks (linting, type-checking, formatting) regularly exceed the hardcoded 30s default timeout, causing the commit to fail with a timeout error in the UI. The hook itself succeeds — it just needs more time.

The 120s limit matches common CI expectations for pre-commit hook runtimes while still catching genuinely stuck processes.

Only the commit path is changed. All other git operations keep the existing 30s default.

Fixes #1194

Checklist

  • This PR is small and focused
  • I explained what changed and why

Note

Increase git commit timeout to 120 seconds for slow pre-commit hooks

Replaces runGit with executeGit in GitCore.commit to pass an explicit timeoutMs: 120000 option, up from the previous default. This prevents premature failures when pre-commit hooks take a long time to run.

Macroscope summarized f13bf0d.

The git commit command used the default 30s timeout which causes
failures for repositories with slow pre-commit hooks (e.g. linting,
type-checking). Increase to 120s so hooks have time to complete.

Fixes pingdotgg#1194
@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 013ab767-7168-4808-a467-06010bc0cb72

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 23, 2026
@C-W-D-Harshit C-W-D-Harshit mentioned this pull request Mar 23, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Git commit time-out

1 participant