git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
XLXimin 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
Next: Duy Nguyen
Message 1 of 5 in “[BUG] git-init does not respect existing separate-git-dir”
  1. Ximin LuoAug 29, 2013
  2. Duy NguyenAug 29, 2013
  3. Junio C HamanoAug 29, 2013
  4. Make setup_git_env() resolve .git file when $GIT_DIR is not specifiedNguyễn Thái Ngọc Duy, Aug 31, 2013
  5. Junio C HamanoSep 3, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.