Page MenuHomePhabricator

Pushing a Git repository immediately after creating it can fail because "git init" has not run yet
Open, LowPublic

Description

If you create a repository via the API and then immediately push to it, the push can fail because the repository hasn't been initialized yet:

...
# Ready to receive on cluster host "repo018.phacility.net".
fatal: '/core/repo/locations-yurt/1/' does not appear to be a git repository
# Released cluster write lock.
...

The git init will run via the daemons, but may take several seconds even on a relatively empty install.

It would be nice to block, git init, then accept the push, since there's no technical reason we can't.

This has vanishingly low impact in most situations, but impacts construction of the "Locations" interview scenario.

Event Timeline

epriestley renamed this task from Pushing a repository immediately after creating it can fail to Pushing a Git repository immediately after creating it can fail because "git init" has not run yet.Mar 12 2017, 7:22 PM