Re: git ls-files -o under .git/ prints all repository files
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jan 19, 2007, 08:32 UTC
- Message-ID
- <7vfya7ju1l.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <200701190727.26505.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
Show 5 quoted lines
> On Friday 2007, January 19 06:47, Junio C Hamano wrote: > >> + mode = share ? 0777 : 0333; > > So if the repository is shared we're allowed to shoot ourselves in the foot?
Have you actually read the code to see what 'share' variable means there? It is only false when creating the toplevel .git directory and always true for its subdirectories.
> Also; what does this do to .git/config .git/description?
Nothing unusual. The code explicitly asks for .git/config by name, so that does not involve readdir(".git"), which is what the 0333 change prevents from running.
> On ocassion I've found myself doing > mv .git/refs/remotes/origin .git/refs/remotes/up > > Which this patch would break.
Does it?
And everybody commented on this thread,
EASY.
You all should not take "amusing" too seriously. That was a tongue-in-cheek patch.
I am very inclined to say
$ cd .git && git clean
or
$ cd .git/objects && git clean
falls into the same category as
$ su # cd / && git-init-db && git clean
In other words, I am not sure if there is anything worth fixing.