Skip to content

git rpull can delete ALL submodule directories #9

@TimMensch

Description

@TimMensch

There's a bug in rpull where SOMETIMES it will decide to delete all of the submodule directories and then re-pull them.

No work is lost; the submodules were all up to date each time I've seen this happen. But a LOT of time is lost! It takes on the order of 45 minutes to pull all of the submodule repositories over the VPN.

This is a pretty serious showstopper bug for me. What would I need by way of logs to try to track this down? My assumption is that the "delete submodules that have been removed" is screwing up. My first thought is that the "rewind" was rewinding too far, but it really shouldn't be rewinding so far that the submodules aren't defined -- looking at the history, it should have only rewound a few commits.

A related bug that's frustrating is that git-submodule-tools forgets the branches that the submodules are set to. We have each submodule set to track particular branches explicitly (using .gitmodules), and so the heuristic that tries to "guess" the tracked branch is often wrong. But at least that's easily fixed. Could the fact we're specifying branches in .gitmodules be breaking something?

Here's an example of the output of a session that killed the subfolders:

tmensch@SEA-9901068411 ~/projects/STX-SdkOnly
$ git rpull
Launched ["c:/users/tmensch/devel/bin/plink.exe", "-P", "2222", "tmensch@172.22.92.57", "git-upload-pack '/pkg/STX-SdkOnly'"]
Launched c:/users/tmensch/devel/bin/plink.exe, PID=6416
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 8 (delta 5), reused 5 (delta 2)
Unpacking objects: 100% (8/8), done.
From ssh://git.amazon.com:2222/pkg/STX-SdkOnly
a2d25dd..0a22c60  feature-uberbuild -> origin/feature-uberbuild
First, rewinding head to replay your work on top of it...
Fast-forwarded feature-uberbuild to 0a22c60e902b09e107c13ecdcf1f89a14292a61f.
Launched ["c:/users/tmensch/devel/bin/plink.exe", "-P", "2222", "tmensch@172.22.103.69", "git-upload-pack '/pkg/AmazonCompositeResult'"]
Launched c:/users/tmensch/devel/bin/plink.exe, PID=2840
Launched ["c:/users/tmensch/devel/bin/plink.exe", "-P", "2222", "tmensch@172.22.70.198", "git-upload-pack '/pkg/AndroidNdkCMakeToolchain'"]
Launched c:/users/tmensch/devel/bin/plink.exe, PID=7856
Launched ["c:/users/tmensch/devel/bin/plink.exe", "-P", "2222", "tmensch@172.23.149.248", "git-upload-pack '/pkg/BoostHeaders'"]
Launched c:/users/tmensch/devel/bin/plink.exe, PID=8092
Launched ["c:/users/tmensch/devel/bin/plink.exe", "-P", "2222", "tmensch@172.23.169.148", "git-upload-pack '/pkg/Curl'"]
Launched c:/users/tmensch/devel/bin/plink.exe, PID=7148

...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions