{"thread":{"id":"51330","subject":"Should sparse checkout be extended to clone, fetch, commit, and merge?","startedAt":"2019-06-18T04:25:14Z","lastAt":"2019-06-18T04:25:14Z","messageCount":1,"participants":["Matthias Goerner"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"377384","messageId":"CALB88e9n7raRET8Av-uSih8Xj=iAaUYrVx_+cOR2Bf8zYGQaKw@mail.gmail.com","threadId":"51330","inReplyTo":null,"subject":"Should sparse checkout be extended to clone, fetch, commit, and merge?","fromName":"Matthias Goerner","fromEmail":"enischte@gmail.com","sentAt":"2019-06-18T04:25:00Z","receivedAt":"2019-06-18T04:25:14Z","isPatch":false,"sender":{"key":"enischte@gmail.com","avatar":null},"body":"Hi!\n\nSparse checkout is a great start but I wish that clone, fetch, commit,\nand merge also had sparse functionality to skip operating on objects\nassociated with directories not listed in the sparse-checkout (or\nsimilar) configuration file. To clarify, this is different from\nshallow clone or fetch which skips old commits but still fetches the\nobjects associated to every file in the tree.\n\nThis functionality would be very useful when dealing with large\nrepositories. Sparse checkout helps, but it doesn't reduce at all the\namount of traffic and the amount of disk spaces needed for the .git\nrepository. git submodule is an alternative, but ideally, one wouldn't\nneed to break up a repository as it grows and use git submodule.\n\nAre there any plans to implement this? And if not, why not? How much\neffort would be to implement this?\n\nI don't see a conceptual reason why this can't be done. In particular,\nit is not hard to see that making a commit after a sparse clone/fetch\nis still possible even though one does not know the content of each\nfile in the repository. For example, assume a repository has two\ndirectories /A and /B at the root and a user fetched only the objects\nin /B to make a change to a file in /B. git could compute the new hash\nof the root to make a commit by computing the new hash for /B and\nsimply using the old hash for /A without the need to know the content\nof /A.\n\nCheers,\n    Matthias\n"}]}