Skip to content

fix: wait for git daemon to listen before connecting - #2219

Merged
Byron merged 1 commit into
gitpython-developers:mainfrom
Vogtinator:main
Aug 28, 2026
Merged

fix: wait for git daemon to listen before connecting#2219
Byron merged 1 commit into
gitpython-developers:mainfrom
Vogtinator:main

Conversation

@Vogtinator

Copy link
Copy Markdown
Contributor

Properly wait instead of hardcoding a short sleep.

Fixes #1676

Properly wait instead of hardcoding a short sleep.

Fixes gitpython-developers#1676
@Vogtinator
Vogtinator force-pushed the main branch 2 times, most recently from 32475bc to db1a2cf Compare August 27, 2026 14:24

@Byron Byron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go with this, thank you!

A follow-up could mean to reduce the time to sleep, as I'd expect the socket to become available much earlier, which should make dependent tests start running a little bit faster.

@Byron
Byron merged commit a9fb008 into gitpython-developers:main Aug 28, 2026
53 checks passed
@Vogtinator

Copy link
Copy Markdown
Contributor Author

The ideal fix is to change git daemon --detach in a way that it opens the socket for listening before daemonizing, then the method here can just do a blocking start, ensuring that once it exits with 0 that it accepts connections. Also makes error handling easier: Currently if git daemon is not installed, the test suite fails with "connection refused", without a helpful message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants