Re: What's cooking in git.git (Aug 2020, #02; Mon, 10)
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Aug 11, 2020, 05:01 UTC
- Message-ID
- <CAPig+cRtS3iMp3zLRKBOvEchrDPrCmozndbFpWtjiosk5nqGew@mail.gmail.com>
- In-Reply-To
- <xmqqsgcub811.fsf@gitster.c.googlers.com>
On Mon, Aug 10, 2020 at 3:45 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> * es/init-no-separate-git-dir-in-bare (2020-08-10) 1 commit > - init: disallow --separate-git-dir with bare repository > > "git init --separate-git-dir" can be used in an existing repository > with a working tree to move its .git/ directory away from the > working tree. Even though this re-init feature makes no sense in > an existing bare repository, it was not erroring out. Now it does.
This description is a bit misleading since it focuses only on existing repositories, however, --separate-git-dir is intended for use with both new and existing repositories. So, perhaps the description could be rewritten something like this:
The purpose of "git init --separate-git-dir" is to initialize a
new project with the repository separate from the working tree,
or, in the case of an existing project, to move the repository
(the .git/ directory) out of the working tree. It does not make
sense to use --separate-git-dir with a bare repository for which
there is no working tree, so disallow its use with bare
repositories.