[BUG] bare repository detection does not work with aliases
- From
Mark Lodato <lodatom@gmail.com>
- Date
- Mar 7, 2013, 22:47 UTC
- Message-ID
- <CAHREChhuX82ibNEDQnQUeS9TEeyMFGpuNhyXzt1Pn-Tt2BVOQA@mail.gmail.com>
It seems that the fallback bare repository detection in the absence of core.bare fails for aliases.
$ git init --bare foo $ cd foo $ git config alias.s 'status -sb' $ git s fatal: This operation must be run in a work tree $ sed -i -e '/bare =/d' config $ git s ## Initial commit on master ?? HEAD ?? config ?? description ?? hooks ?? info/ $ git status -sb fatal: This operation must be run in a work tree
The reason I am using the fallback is to use a single bare repository with multiple working directories (via git-new-workdir) as suggested in 8fa0ee3b [1].
[1] https://github.com/git/git/commit/8fa0ee3b50736eb869a3e13375bb041c1bf5aa12