repack behaves unexpectedly if called in a bare _subrepo_

From: Alex Riesen <hidden>
Date: 2016-06-15 22:43:17

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
)

Unexpectedly, the "super" repo is repacked, even though repack is
called from the "sub". To actually repack the repo in the current
directory if it is bare, use "git --bare repack ...".

This kind of makes core.bare pointless: can't rely on it anyway.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help