% mkdir 1; cd 1 % echo > a; git add a; git commit -m a % cd .. % git clone -s 1 2 % git push . master:master fatal: Could not switch to '/tmp/a/1/.git/objects/n:/usr/games/bin:/usr/local/ipod-chain' fatal: The remote end hung up unexpectedly % PATH=/bin:/usr/bin git push . master:master Everything up-to-date The same thing happens if i try to push from 1 to 2: % cd ../1 % git push ../2 fatal: Could not switch to '/tmp/a/1/.git/objects/n:/usr/games/bin:/usr/local/ipod-chain' fatal: The remote end hung up unexpectedly % echo $#PATH 196 % echo $PATH /home/mikaelh/bin:/opt/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/i686-pc-linux-gnu/gcc-bin/4.2.4:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin:/usr/local/ipod-chain/bin d79796bcf05b89774671a75b3285000c43129823 is first bad commit commit d79796bcf05b89774671a75b3285000c43129823 Author: Junio C Hamano <gitster@xxxxxxxxx> Date: Tue Sep 9 01:27:10 2008 -0700 push: receiver end advertises refs from alternate repositories Earlier, when pushing into a repository that borrows from alternate object stores, we followed the longstanding design decision not to trust refs in the alternate repository that houses the object store we are borrowing from. If your public repository is borrowing from Linus's public repository, you pushed into it long time ago, and now when you try to push your updated history that is in sync with more recent history from Linus, you will end up sending not just your own development, but also the changes you acquired through Linus's tree, even though the objects needed for the latter already exists at the receiving end. This is because the receiving end does not advertise that the objects only reachable from the borrowed repository (i.e. Linus's) are already available there. This solves the issue by making the receiving end advertise refs from borrowed repositories. They are not sent with their true names but with a phoney name ".have" to make sure that the old senders will safely ignore them (otherwise, the old senders will misbehave, trying to push matching refs, and mirror push that deletes refs that only exist at the receiving end). Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> :100644 100644 6d6027ead17b86519d69c3dfc9b98c01e916d277 45e3cd90fd476cdb0a32e5de27739b18e060e031 Mbuiltin-receive-pack.c :100644 100644 98a742122dbacbb39fa104cdfe909a9a884ed7b6 99af83a0479ef472078afcd288b1f6ba6283a2f0 Mcache.h :100644 100644 ae550e89c0942bb9e34b252b653c40e869a074a4 12be17b5dace07a2ca71613e4e9093cdb77492ac Msha1_file.c -- Mikael Magnusson -- 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