{"thread":{"id":"65086","subject":"git clone --bundle-uri: follow redirects?","startedAt":"2026-02-27T12:04:04Z","lastAt":"2026-02-27T12:04:04Z","messageCount":1,"participants":["Xavier Morel"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"537284","messageId":"0a5a8da9-5565-41b0-9ac2-7d11ae116b3a@odoo.com","threadId":"65086","inReplyTo":null,"subject":"git clone --bundle-uri: follow redirects?","fromName":"Xavier Morel","fromEmail":"xmo@odoo.com","sentAt":"2026-02-27T12:04:01Z","receivedAt":"2026-02-27T12:04:04Z","isPatch":false,"sender":{"key":"xmo@odoo.com","avatar":"https://gravatar.com/avatar/42b8eb16dcf3bd6c1998698115b36ab6f4d69f93710caa10ff8ab04a9652ae34?d=mp&s=160"},"body":"As I was playing with --bundle-uri again, I found a new oddity: git \ndoesn't seem to follow redirects when resolving the URI, and the error \nfeedback is less than ideal.\n\nOne of the few projects which seem to publicly use and advertise bundles \n(or at least one of the few that's easy to find) is the kernel, they \nhave a pages recommending either using a custom script[0] or fetching \nthe bundle locally then cloning it[1] -- the latter in order to resume \nthe bundle download on poor connections. I figured I could just\n\n     git clone \n--bundle-uri=https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/clone.bundle \nhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git\n\nhowever that immediately prints\n\n     warning: failed to download bundle from URI \n'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/clone.bundle'\n     warning: failed to fetch objects from bundle URI \n'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/clone.bundle'\n\n From what I understand, this is because the bundle-uri above is a \npermanent redirect to \nhttps://mirrors.edge.kernel.org/pub/scm/.bundles/pub/scm/linux/kernel/git/torvalds/linux/clone.bundle, \nand while wget will follow redirects by default that is not the case of \ncurl. Thus git finds itself with essentially no content, and definitely \nnot bundle content.\n\n[0]: https://www.kernel.org/best-way-to-do-linux-clones-for-your-ci.html\n[1]: https://www.kernel.org/cloning-linux-from-a-bundle.html\n"}]}