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

Re: repack behaves unexpectedly if called in a bare _subrepo_

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

Alex Riesen [off-list ref] writes:
Just a heads-up. This took me by surprise. And I suppose it will be
the same even if the subrepo is a real subproject.

To illustrate:

(
    mkdir super && cd super
    git init
    echo 0 > a; git add a; git commit -m0
    echo 2 >> a; git commit -a -m1
    echo 3 >> a; git commit -a -m2
    cp -a .git sub
    cd sub
    git --bare config --bool core.bare true
    git repack -a -d
)
I think what is happening is that in that bare repository 'sub',
the sequence we find where a git repository is is defined so
that the current directory is checked way after "one of my
parents with .git/ subdirectory" check.

If super (a directory) has a subproject sub as its subproject,
then you would be copying .git to sub/.git, not sub/, wouldn't
you?  What are you trying to achieve?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help