Git repositories may be contained in a .git directory or a .git file
in the workdir hierarchy, but Atom only recognizes the directory format.
Teach Atom to recognize the filesystem-agnostic Git symbolic link
used by default in many situations including, for example, submodules.
The .git file contains a relative or absolute path to the location of
the real git-dir, preceded by the 8-byte string "gitdir: ".
Here's a console log showing the normal creation of such a symbolic link.
/tmp $ git init --separate-git-dir foo.git bar
Initialized empty Git repository in /tmp/foo.git/
/tmp $ ls
/tmp $ bar foo.git
/tmp $ ls -la bar
drwxr-xr-x 2 hordp hordp 4096 Sep 18 15:54 .
drwxr-xr-x 4 hordp hordp 4096 Sep 18 15:54 ..
-rw-r--r-- 1 hordp hordp 25 Sep 18 15:54 .git
/tmp $ ls foo.git
branches config description HEAD hooks info objects refs
/tmp $ cat bar/.git
gitdir: /tmp/foo.git
Fixes#8876
Currently, running coffeelint produces this error and causes Travis
builds to fail:
```
Running "coffeelint:src" (coffeelint) task
src/command-installer.coffee
✖ line 73 Line contains inconsistent indentation Expected 2 got 0
✖ 1 error
Warning: Task "coffeelint:src" failed. Use --force to continue.
Error: Task "coffeelint:src" failed.
```
See https://github.com/clutchski/coffeelint/issues/189 for more information
on this problem and suggested approach, and for a different place in Atom
where this approach is used see this:
ca39c106d6/src/config.coffee (L984)
Base on our research, this is the only non-standard Q method people are
really calling. We didn’t check the really obscure stuff, but this
should cover the vast majority of issues.
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>