Weird shallow-tree conversion state, and branches of shallow trees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was doing some random tests with shallow trees, and ran into two
issues - the first is a shallow tree that doesn't extend anymore when it
should, and the second is some branched shallow tree trouble.

1.
(I was using the kernel.org Git repo for my testing here)
> git clone --depth 1 git://GIT-REMOTE-URL
> # do some local commits
> git pull --depth 1000000 # some very large number, to try and add all the history

At this point, I noticed that my tree still seemed to be shallow, and no
matter what I tried, I couldn't un-shallow it.

.git/shallow contained a single line:
> 9c405082d96ed7a7ed830f9861dbad9a32e4d268

And moving the shallow file out the way, fsck --full gets me:
> broken link from  commit 9c405082d96ed7a7ed830f9861dbad9a32e4d268
>               to  commit bb3e781d7f6259eb414cbecd8bad74cd4a188b41
> broken link from  commit 9c405082d96ed7a7ed830f9861dbad9a32e4d268
>               to  commit 9bfbe261923f4e9d89f65e6755fa6501aa6531b0
> missing commit bb3e781d7f6259eb414cbecd8bad74cd4a188b41
> missing commit 9bfbe261923f4e9d89f65e6755fa6501aa6531b0

Any ideas on why it's not going to full depth?
I don't have a reliable test case for this yet, sometimes it does go deep
properly, sometimes it doesn't.

2.
Again about shallow repos, a development problem I ran into.
> git clone --depth 1 git://GIT-REMOTE-URL
> git checkout -b working-branch
> # do various work, and git-commit the changes
> git checkout master 
> git pull
> # some time goes by, and you want the latest upstream changes
> git checkout working-branch
> git pull . master

The last pull from the local master fails. This seems weird, because if
working-branch development is done on the master instead, the earlier pull
never complains. So in this case, the working-branch should be able to pull
from the local master branch fine.

This bug basically stops people from being able to take a shallow clone of a
repository with a lot of history, and have multiple working branches on it.

-- 
Robin Hugh Johnson
Gentoo Linux Developer & Council Member
E-Mail     : robbat2@xxxxxxxxxx
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

Attachment: pgp611wXBSPdM.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]