gitlabhq/gitlabhq — pull request #2450 by jojosch (2012-12-31 22:34:04+00:00)
Title: fix grack accessing files beginning with .git

when accessing a file called `.git[something]` in the file browser (in the root folder or any other folder), grack is invoked.

with this fix grack is only invoked, if the http-git url `http://mydomain.tld/[NAMESPACE]/[REPO].git` is cloned.

Accessing
`http://mydomain.tld/[NAMESPACE]/[REPO]/tree/master/.gitignore` or `http://mydomain.tld/[NAMESPACE]/[REPO]/tree/master/subfolder/subfolder/.gitkeep` or
`http://mydomain.tld/[NAMESPACE]/[REPO]/tree/master/subfolder/.gitrules`
is now possible and does not invoke grack anymore.

solves part of #2449