Re: [BUG] git-new-workdir doesn't understand packed refs

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [BUG] git-new-workdir doesn't understand packed refs

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:05

Peter Baumann [off-list ref] writes:
On Wed, Apr 18, 2007 at 09:23:14AM -0700, Junio C Hamano wrote:
quoted
Recursively dereferencing the symbolic link by hand to a limit
to avoid infinite recursion (error out when we reach the limit)
would be a more elaborate solution that probably is the right
thing to do.
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".

Re: [BUG] git-new-workdir doesn't understand packed refs

From: Peter Baumann <hidden>
Date: 2016-06-15 22:43:05

On Wed, Apr 18, 2007 at 11:17:43AM -0700, Junio C Hamano wrote:
Peter Baumann [off-list ref] writes:
quoted
On Wed, Apr 18, 2007 at 09:23:14AM -0700, Junio C Hamano wrote:
quoted
Recursively dereferencing the symbolic link by hand to a limit
to avoid infinite recursion (error out when we reach the limit)
would be a more elaborate solution that probably is the right
thing to do.
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

The user should only create new work dirs which refere to the repo and not
to another workdir.

But *iff* thats the only point for keeping my patch out I'll fix it, but
not tonight. (Leaving now ...)

-Peter

Re: [BUG] git-new-workdir doesn't understand packed refs

From: Julian Phillips <hidden>
Date: 2016-06-15 22:43:05

On Wed, 18 Apr 2007, Peter Baumann wrote:
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
btw, if you copy git-new-workdir to $GIT_EXEC_PATH then you can do

 	git new-workdir a b

(and the bash completion script works too. :D)

It's cunning stuff this git program ...

-- 
Julian

  ---
All the world's a stage and most of us are desperately unrehearsed.
 		-- Sean O'Casey
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help