{"thread":{"id":"62568","subject":"FEATURE/QUESTION: git fetch only commit objects, but not tree/file objects","startedAt":"2024-11-29T16:31:09Z","lastAt":"2024-12-01T02:36:10Z","messageCount":2,"participants":["Antonio Russo","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"508339","messageId":"c99248d4-777f-461b-b4ab-4cc8df3f09a3@aerusso.net","threadId":"62568","inReplyTo":null,"subject":"FEATURE/QUESTION: git fetch only commit objects, but not tree/file objects","fromName":"Antonio Russo","fromEmail":"aerusso@aerusso.net","sentAt":"2024-11-29T16:24:58Z","receivedAt":"2024-11-29T16:31:09Z","isPatch":false,"sender":{"key":"aerusso@aerusso.net","avatar":"https://avatars.githubusercontent.com/u/6502699?v=4"},"body":"Hello everyone,\n\nSometimes I'd like to investigate the commit history of a (large) git repository,\nbut I don't actually (yet) care about the actual files in the repository. I know\nabout shallow clones, but it covers kind of the opposite problem: a person may\njust want the files, but not the history.\n\n1. Is there a way to download only the git commit objects, and not the\ncorresponding tree (or file) blobs?\n\n2. Is this a use case that anyone else cares about?  I suppose a ton of code\nassumes it can follow any references, so implementing this as a feature means a\nton of code would need to be adapted to handle the reference-not-locally-present\ncase.  Maybe it might be interesting, but would make the git code-base way too\ncomplicated?\n\nI don't really know what keywords to look for, and man git-fetch did not\nsuperficially seem to answer this, so I apologize if I wasn't able to find this\nfeature in the documentation.\n\nBest,\nAntonio\n"},{"id":"508382","messageId":"xmqq8qt0m8o8.fsf@gitster.g","threadId":"62568","inReplyTo":"c99248d4-777f-461b-b4ab-4cc8df3f09a3@aerusso.net","subject":"Re: FEATURE/QUESTION: git fetch only commit objects, but not tree/file objects","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-12-01T02:36:07Z","receivedAt":"2024-12-01T02:36:10Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Antonio Russo <aerusso@aerusso.net> writes:\n\n> I don't really know what keywords to look for, and man git-fetch did not\n\nYou probably want to look for \"--filter\" in \"git help clone\".\n\n\n"}]}