From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Matthias Lederhofer <matled@gmx.net>, git@vger.kernel.org
Subject: Re: [PATCH 3/5] Clean up work-tree handling
Date: Fri, 27 Jul 2007 20:32:27 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0707272029140.14781@racer.site> (raw)
In-Reply-To: <7v8x911wn6.fsf@assigned-by-dhcp.cox.net>
Hi,
On Fri, 27 Jul 2007, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > But there is a fundamental question I have to ask: Is there any reason why
> >
> > $ git --git-dir=/some/where/else.git bla
> >
> > should pretend that the repo is bare if core.bare == 1? I mean, we are
> > implicitely setting the work tree to the cwd, no?
>
> I have two repositories at the primary k.org machine.
>
> - /home/junio/git.git --- this is with a worktree so that I can
> build and test on a FC machine (my primary development
> machine at home is a Debian).
>
> - /pub/scm/git/git.git/ --- this is a bare repository that is
> mirrored out to git://git.kernel.org/ and friends.
>
> And I usually am in the former. From time to time, I do this:
>
> $ GIT_DIR=/pub/scm/git/git.git/ git fsck
> $ GIT_DIR=/pub/scm/git/git.git/ git repack
>
> because I am old fashioned, but I would expect these to be
> equivalent to the above:
>
> $ git --git-dir=/pub/scm/git/git.git/ fsck
> $ git --git-dir=/pub/scm/git/git.git/ repack
>
> I do not think these imply that the repository is with worktree.
But in your use cases it does not matter, since neither fsck nor repack
need a worktree.
Here is one of _my_ scenarios: I want to track a directory I have no write
access to (or better put: I should have no write access to). So I created
a bare repository, and when I add new files I use the "GIT_DIR=... git..."
mantra.
But you're right, I could just set core.worktree=... and unset core.bare.
I can change that easily enough. Other comments on the series?
Ciao,
Dscho
prev parent reply other threads:[~2007-07-27 19:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 6:30 [PATCH 3/5] Clean up work-tree handling Johannes Schindelin
2007-07-26 6:56 ` Shawn O. Pearce
2007-07-26 7:06 ` Junio C Hamano
2007-07-26 14:01 ` Johannes Schindelin
2007-07-26 18:56 ` Junio C Hamano
2007-07-26 22:09 ` Matthias Lederhofer
2007-07-26 22:31 ` Junio C Hamano
2007-07-27 10:50 ` Johannes Schindelin
2007-07-27 19:20 ` Junio C Hamano
2007-07-27 19:32 ` Johannes Schindelin [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=Pine.LNX.4.64.0707272029140.14781@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=matled@gmx.net \
/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).