Subject: [BUG] git-init does not respect existing separate-git-dir

From: Ximin Luo <[email-masked]>
Date: Thu, 29 Aug 2013 13:39:02 +0100

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