Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: Create object subdirectories on demand

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:08

Possibly related (same subject, not in this thread)

Linus Torvalds [off-list ref] writes:
This has _not_ gotten a lot of testing, but I verified that basic things 
seem to work, and that packing an archive properly removes the unnecessary 
subdirectories.

I'd suggest it sit in "pu" for a while.
I typically use the tip of "pu" myself, which resulted in an
interesting case (nothing grave).  After running 'git prune', I
switched to another topic branch that did not include this
patch, built it, and tried it out -- and got complaint because
the earlier 'git prune' happened to remove ".git/objects/00".
Now I was not in a valid git repository anymore ;-).

This needs to wait until everybody's git get this update,
especially, I cannot use this version in my $HOME/bin/ on
kernel.org right now.

But then once everybody else updates, the repository their git
creates cannot be read by my git -- an interesting chicken and
egg problem.

Maybe successful rmdir() immediately followed by mkdir(), if we
are willing to waste 4KB or so per empty directory, trading
space for safety and ease of transition?  That is, phase I tools
do not complain if objects/00 is missing, lazily creates
object/??/ is missing, and makes sure empty directories are
pruned but still recreates them for safety.  Then phase II tools
then stops the recreating part.
However, somebody should really check my code carefully before merging 
this. In particular, I didn't test "git-ssh-pull" at all, so I'm not sure 
I actually fixed the "write temp-file" thing properly.
Well, the thing is, I do not use commit walkers over ssh myself
and honestly consider them having outlived their usefulness.
But you are right -- I should look at this one again before
placing in the master.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help