Seravo / wordpress

The WordPress project layout used by many of Seravo's customers, suitable also for local development with Vagrant and git deployment
https://seravo.com
GNU General Public License v3.0
102 stars 54 forks source link

Error in post-receive hook: fatal: not a git repository #133

Closed JoosuaKoskinen closed 4 years ago

JoosuaKoskinen commented 4 years ago

A customer noticed the following error while pushing to production after installing the post-receive hook:

remote: Seravo: running post-receive git hook
remote: fatal: not a git repository: '.'
remote: Seravo: Flushing all caches...
tnottu commented 4 years ago

Probably due to removal of the GIT_DIR in this commit https://github.com/Seravo/wordpress/commit/e59b4f082e962ee33da2c2bb4979929d03dbc782#diff-8023fc70ccc637626d348363aec8ae0dL22

JoosuaKoskinen commented 4 years ago

Using GIT_DIR indeed fixes it.

ottok commented 4 years ago

Can you @JoosuaKoskinen fix this and document properly GIT_DIR so nobody in the future removes it thinking it has no purpose (as on local runs it has no purpose, there is only the remote push use case I think?)

JoosuaKoskinen commented 4 years ago

Fixed in https://github.com/Seravo/wordpress/commit/45e7d9df2d8bd90b82e476ebcb65eb8cd884dc96