Skip to content

gitserver: set GIT_DIR in exec handler

Administrator requested to merge k/GIT_DIR into master

Created by: keegancsmith

If a git disk gets in a bad state "dir" may no longer look like a git dir. This then leads to git trying to discover GIT_DIR and crawling all the way up the filesystem. This can lead to strange errors. This has been observed sometimes when we restore from backup.

Part of https://github.com/sourcegraph/sourcegraph/issues/8415#issuecomment-589179274

Merge request reports

Loading