From: Junio C Hamano <gitster@pobox.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Fix new-workdir (again) to work on bare repositories
Date: Tue, 21 Aug 2007 20:38:14 -0700 [thread overview]
Message-ID: <7vtzqsme6x.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7v1wdwntc6.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Tue, 21 Aug 2007 20:25:45 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
>
>> My day-job workflow involves using multiple workdirs attached to a
>> bunch of bare repositories.
>
> Are you sure the patch would help?
>
> For one thing, I do not think we supported such a layout,
> officially or unofficially --- the thing is in contrib so it
> could not be official, but that is besides the point ;-). Older
> git might have worked by accident, though.
>
> You may have made the part to create the new directory and make
> bunch of symbolic links to work with your patch, but as far as I
> know, new-workdir is designed to share the .git/config file with
> the borrowed repository, which means the configuration would say
> "core.bare = yes" for a bare repository. So I suspect that the
> initial checkout after creating the new directory and populating
> its .git would barf, although I haven't tested it.
Having said that, I am not saying that we should forbid such a
layout that uses a work tree or more attached to a bare
repository. We need to figure out what the best practice should
be.
* Maybe using such a layout needs GIT_WORK_TREE environment to
be set?
* Maybe using such a layout needs "core.bare = false" even
though the true repository is a bare repository? This has an
obvious drawback that git-fetch cannot update the branch
pointed by HEAD even though it is a bare repository.
* Maybe ignore "core.bare = true" if $GIT_DIR ends with
"/.git"? I do not like relying on names too much, though.
* Maybe ignore "core.bare = true" if $GIT_DIR/index exists?
This is almost right, except that there is a chicken and egg
problem -- the index does not exist until the initial
checkout, and checkout wants to make sure you are not in a
bare repository.
prev parent reply other threads:[~2007-08-22 3:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-22 1:50 [PATCH] Fix new-workdir (again) to work on bare repositories Shawn O. Pearce
2007-08-22 3:25 ` Junio C Hamano
2007-08-22 3:36 ` Shawn O. Pearce
2007-08-22 4:33 ` Junio C Hamano
2007-08-22 5:33 ` Shawn O. Pearce
2007-08-22 3:38 ` Junio C Hamano [this message]
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=7vtzqsme6x.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.