git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 21:33:57 -0700	[thread overview]
Message-ID: <7v3ayckx1m.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20070822033625.GN27913@spearce.org> (Shawn O. Pearce's message of "Tue, 21 Aug 2007 23:36:26 -0400")

"Shawn O. Pearce" <spearce@spearce.org> writes:

>> 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.
>
> Indeed.  I have a driver script that sets up my bare repos, it
> removes core.bare from their configs.  So if you go into the bare
> repo our auto-sensing bare thing gets activated and says "Hmm, it
> ends in .git but isn't exactly .git so its bare!" (correct answer).
> If you cd into a workdir created by git-new-workdir the auto-sensing
> bare thing gets activated and says "Hmm, it is exactly .git so its
> not-bare!" (correct answer).
>
> So removing that core.bare thing makes the magic work.

Ok, that is better than the response I sent (our messages
crossed).  In that case, perhaps you would want a warning or a
suggestion at the end of new-workdir script, probably before
checkout, to teach the user about that magic?

  reply	other threads:[~2007-08-22  4:34 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 [this message]
2007-08-22  5:33       ` Shawn O. Pearce
2007-08-22  3:38   ` Junio C Hamano

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=7v3ayckx1m.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).