{"thread":{"id":"40705","subject":"Cloning of submodule with --depth should follow the branch option","startedAt":"2015-11-02T07:55:41Z","lastAt":"2015-11-02T07:55:41Z","messageCount":1,"participants":["Mikhail Zabaluev"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"272724","messageId":"CAKUkx92jfjti4WGmeOHdXi2uCGTu0AifL23NzKCWg7n1vJZDmg@mail.gmail.com","threadId":"40705","inReplyTo":null,"subject":"Cloning of submodule with --depth should follow the branch option","fromName":"Mikhail Zabaluev","fromEmail":"mikhail.zabaluev@gmail.com","sentAt":"2015-11-02T07:55:41Z","receivedAt":"2015-11-02T07:55:41Z","isPatch":false,"sender":{"key":"mikhail.zabaluev@gmail.com","avatar":null},"body":"Hi,\n\nI have an issue with git 2.4.3 when trying to limit the amount of data\nfetched when cloning submodules. The --depth option is useful, but\nwhen .gitmodules specifies a non-default branch, the submodule\nrepository clone invocation (which is a single-branch clone due to\n--depth) fetches master regardless, and then checkout fails due to a\nnonexistent tree reference. I think it would be sensible in this case\nto pass --branch to the submodule clone command.\n\nHere's a repository to exercise: https://github.com/gi-rust/gir\n\nBest regards,\n  Mikhail\n"}]}