git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Peter Baumann <waste.manager@gmx.de>
Cc: Julian Phillips <julian@quantumfyre.co.uk>
Cc: git@vger.kernel.org
Subject: Re: [BUG] git-new-workdir doesn't understand packed refs
Date: Wed, 18 Apr 2007 11:42:24 -0700	[thread overview]
Message-ID: <7v647th6cv.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20070418183156.GF5913@xp.machine.xx> (Peter Baumann's message of "Wed, 18 Apr 2007 20:31:56 +0200")

Peter Baumann <waste.manager@gmx.de> writes:

<ot>

Getting more and more annoyed by your stupid Mail-Followup-To...
I do *not* want to bother Julian with a message that points out
a flaw (in my opinion) in YOUR reasoning but you are forcing me
to send my message that way, which I have to waste time
correcting every time.  Grumble.

</ot>

> On Wed, Apr 18, 2007 at 11:17:43AM -0700, Junio C Hamano wrote:
>> Peter Baumann <waste.manager@gmx.de> writes:
>> ...
>> > I thought about the case where packed-refs is a symlink to another symlink
>> > and then decided that it's not worth to implement this because a workdir
>> > should be linked to a _repo_ and not another workdir.
>> 
>> That's incredibly weak, as the initial motivation of this patch
>> is that you did not want to say "you should run gc only in the
>> _repo_ not in workdir".
>
> Yes. That's my motivation and it works right now
>
> 	git init a
> 	<hack, hack, hack,>
> 	git commit -a
>
> 	git-new-workdir a b 	# allowed
> 	git-new-workdir a c	# allowed
>
> 	git-new-workdir b d	# NOT ALLOWED

But I do not think you are disallowing it; instead you are
making the same problem appear without telling the user.

Also, how is the above different from this?

	git init a
        cd a ; git gc ; cd ..	# allowed
	git new-workdir a b
	cd b ; git gc ; cd ..	# NOT ALLOWED

You are saying "you should run workdir only in the _repo_ not in
workdir".

As I already said, certain things work differently between a
proper repository and a worktree that borrows .git/refs from a
proper repository, and you always have to know what you are
doing when you use such a setup.  If your goal is to minimize
the difference, I do not think it makes much sense to allow gc
and not allow new-workdir.

On the other hand, if we admit that things work differently, I
think erroring out gc or pack-refs when we see .git/packed-refs
is a symbolic link is much simpler, less error prone and easier
to explain.

  reply	other threads:[~2007-04-18 18:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-17 16:17 [BUG] git-new-workdir doesn't understand packed refs Peter Baumann
2007-04-17 21:55 ` Julian Phillips
2007-04-18  5:52   ` Peter Baumann
2007-04-18  7:26     ` Julian Phillips
2007-04-18  7:40     ` Junio C Hamano
2007-04-18  8:11       ` Peter Baumann
2007-04-18 11:55         ` Julian Phillips
2007-04-18 16:23           ` Junio C Hamano
2007-04-18 17:43             ` Peter Baumann
2007-04-18 18:17               ` Junio C Hamano
2007-04-18 18:31                 ` Peter Baumann
2007-04-18 18:42                   ` Junio C Hamano [this message]
2007-04-18 21:08                     ` Peter Baumann
2007-04-18 21:31                       ` Junio C Hamano
2007-04-19  5:35                         ` [PATCH] Add test for symlinked .git/packed-refs Peter Baumann
2007-04-19  6:06                           ` Junio C Hamano
2007-04-20 16:52                             ` [PATCH] pack-refs: dereference .git/packed-refs if it is a symlink Peter Baumann
2007-04-21 20:05                               ` Junio C Hamano
2007-04-18 18:43                   ` [BUG] git-new-workdir doesn't understand packed refs Julian Phillips
2007-04-18 10:28       ` [PATCH] pack-refs: dereference .git/packed-refs if it is a symlink Peter Baumann
2007-04-18 16:09         ` Linus Torvalds
2007-04-18 17:47           ` Peter Baumann

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=7v647th6cv.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=julian@quantumfyre.co.uk \
    --cc=waste.manager@gmx.de \
    /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).