[BUG] git-init does not respect existing separate-git-dir
- From
- Ximin Luo <infinity0@gmx.com>
- Date
- Aug 29, 2013, 12:39 UTC
- Message-ID
- <521F40E6.4040102@gmx.com>
It should not be necessary to re-specify --separate-git-dir when re-initialising a git repo.
$ git init --separate-git-dir ../repo Initialized empty Git repository in /home/infinity0/tmp/repo/
$ git init /home/infinity0/tmp/wtree/.git/refs: Not a directory 1
One big motivation is so "git init" can be a good "fire-and-forget" invocation that should work anywhere. Currently, one has to do "git init --separate-git-dir $(git rev-parse --git-dir)" which is a lot less elegant.
(Please CC me as I am not subscribed.)
-- GPG: 4096R/1318EFAC5FBBDBCE git://github.com/infinity0/pubkeys.git