From: Tony Risinger <sweetsinsemilla@gmail.com>
To: git@vger.kernel.org, Tony Risinger <sweetsinsemilla@gmail.com>
Subject: git init respecting GIT_WORK_DIR
Date: Wed, 9 Dec 2009 12:37:16 -0600 [thread overview]
Message-ID: <96aa03fc0912091037o6b253f81u41fb660c1f8bf908@mail.gmail.com> (raw)
should this be expected behavior?
-----DOC
core.bare
(snipped)
This setting is automatically guessed by git-clone(1) or
git-init(1) when the repository was created. By default a repository
that ends in "/.git" is assumed to be not bare (bare = false),
while all other repositories are assumed to be bare (bare = true).
-----PROBLEM
[cr@extOFme-d0 ~]$ export GIT_DIR=gitdir.git GIT_WORK_DIR=workdir.work
[cr@extOFme-d0 ~]$ git init
Initialized empty Git repository in /home/cr/gitdir.git/
[cr@extOFme-d0 ~]$ git config core.bare
true
[cr@extOFme-d0 ~]$ git config core.worktree
[cr@extOFme-d0 ~]$
-----SUMMARY
i think git should not be so restrictive in what it considers to be a
bare repository. when you use --work-tree:
[cr@extOFme-d0 ~]$ export GIT_DIR=gitdir.git GIT_WORK_DIR=workdir.work
[cr@extOFme-d0 ~]$ git --work-tree="$GIT_WORK_DIR" init
Initialized empty Git repository in /home/cr/gitdir.git/
[cr@extOFme-d0 ~]$ git config core.bare
false
[cr@extOFme-d0 ~]$ git config core.worktree
/home/cr/workdir.work
everything works as expected. "git init" should respect GIT_WORK_DIR
env variable and set core.bare and core.worktree appropriately.
reply other threads:[~2009-12-09 18:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=96aa03fc0912091037o6b253f81u41fb660c1f8bf908@mail.gmail.com \
--to=sweetsinsemilla@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox