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

Re: [PATCH] Fix initialization of a bare repository

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 17, 2007, 22:20 UTC
Message-ID
<Pine.LNX.4.64.0708172319480.20400@racer.site>
In-Reply-To
<7vhcn0pm3h.fsf@gitster.siamese.dyndns.org>
Hi,
On Wed, 15 Aug 2007, Junio C Hamano wrote:
Show 33 quoted lines
> Wait a minute.
> 
> Let's step back a bit and think what we want to happen here.
> 
>  * No GIT_DIR, no --bare.  Having GIT_WORK_TREE is an error.
> 
>    $ mkdir foo && cd foo && git init
> 
>    We want to say "not bare" and create foo/.git/config and friends. 
> 
>  * No GIT_DIR, with --bare.  Having GIT_WORK_TREE is an error.
> 
>    $ mkdir foo && cd foo && git --bare init
> 
>    We want to say "is bare" and create foo/config, foo/HEAD and
>    friends.
> 
>  * With GIT_DIR but no GIT_WORK_TREE, with or without --bare.
> 
>    $ mkdir foo.git && GIT_DIR=foo.git git init
>    $ mkdir foo.git && GIT_DIR=foo.git git --bare init
> 
>    We want to say "is bare" and create foo.git/config and friends.
> 
>  * With GIT_DIR and GIT_WORK_TREE.  Having --bare is an error.
> 
>    $ mkdir foo.git foo.work
>    $ GIT_DIR=foo.git GIT_WORK_TREE=foo.work git init
> 
>    We want to say "not bare", create foo.git/config and friends,
>    and record core.worktree = /full/path/to/foo.work
> 
> Is the above list reasonable?
Yes.  I'll try to work on it the day after tomorrow.

Ciao, Dscho

Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 8 in “git clone regression”
  1. Junio C HamanoAug 15, 2007
  2. Fix initialization of a bare repositoryJohannes Schindelin, Aug 15, 2007
  3. Junio C HamanoAug 15, 2007
  4. Junio C HamanoAug 15, 2007
  5. Junio C HamanoAug 15, 2007
  6. Johannes SchindelinAug 17, 2007
  7. Fix initialization of a bare repositoryJunio C Hamano, Aug 27, 2007
  8. Johannes SchindelinAug 27, 2007

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.