Replication test setup causing shallow git repos


There is a replication spec which checks for possible ordering issues of migrations. You can find a detailed explanation of that spec and the reasoning for it here. This spec requires setup in the form of rake test:replication:setup

After rake test:replication:setup uses a shallow fetch of the current stable branch to determine the list of migrations in that release. We chose to use a shallow fetch to speed up the spec, that way we didn’t have to get the whole history when running the test setup.

This had the unfortunate side-effect of turning the local repo into a “shallow checkout” which can cause some difficulty when trying to properly backport changes.

To fix this situation simply run git fetch --unshallow and your branches should be back to normal.

If git fetch --unshallow returns:

fatal: --unshallow on a complete repository does not make sense

then you’re fine and haven’t hit the issue.

Sorry for any issues that may have caused you.


If you have run this setup task then subsequently rebased a local tracking branch of the stable release you will get a “grafted” commit history.

This can be seen with the following commands:

14:14:42:~/Source/manageiq (master)$ git checkout euwe 
Switched to branch 'euwe'
14:14:46:~/Source/manageiq (euwe)$ git pull upstream euwe
 * branch            euwe       -> FETCH_HEAD
14:14:57:~/Source/manageiq (euwe)$ git log --oneline --decorate | grep grafted
cfc8a23 (grafted, HEAD -> euwe, upstream/euwe) Merge pull request #11529 from tzumainn/cloud-volume-backup-controller-and-views

If you hit this then git fetch --unshallow should fix everything up.