Re: repack behaves unexpectedly if called in a bare _subrepo_
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 17, 2007, 17:22 UTC
- Message-ID
- <7vir9mzeao.fsf@assigned-by-dhcp.pobox.com>
- In-Reply-To
- <20070617153810.GB2763@steel.home>
Alex Riesen <raa.lkml@gmail.com> writes:
Show 16 quoted lines
> 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?