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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 18 Apr 2007, Peter Baumann wrote:

On Tue, Apr 17, 2007 at 10:55:17PM +0100, Julian Phillips wrote:
 On Tue, 17 Apr 2007, Peter Baumann wrote:

running git-gc or git-gc --prune isn't save because e.g. all the tags
are packed and .git/packed-refs isn't shared on the several workdirs.

 Do you mean that the link wasn't created?  Or that the link was removed and
 replaced with a file when you ran gc from a workdir?


The problem is, when I created the new workdir, I don't have a file
.git/packed-refs, so a new workdir was created with a dangling symlink,
e.g.  workdir/.git/packed-refs -> repo/.git/packed-refs (but the last one
doesn't exist). As it seems, git gc removes the dangling symlink and
replaces it with a file.

Steps to reproduce (written in this mail; after /usr/bin/script gave me an
output whith color coded text *GRR* in ASCII squences):

	mkdir a && cd a && git init
	echo 1 > file.txt
	git add file.txt
	git commit -m "file added"
	git tag v0
	cd ..

	git-new-workdir a b
	cd b && git-gc


Oh. Wait. Just forget that theorie about dangling symlink. git-gc replaces
the symlink in a new workdir with a file. Just confirmed that.

So it isn't save to run git-gc in a workdir.

True. I don't think that it would be a good idea to run any purely repository type commands in a workdir.

--
Julian

 ---
You know you're using the computer too much when:
you call a doctor a "virus scanner"
	-- Lews_Therin
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]