{"thread":{"id":"58568","subject":"Request for a \"connected mode\" -- server-side command execution","startedAt":"2022-10-05T11:23:40Z","lastAt":"2022-10-05T22:20:07Z","messageCount":2,"participants":["Alireza","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"464224","messageId":"CAD9n_qiXZ9xDkJsG0mMmYoVpM8LXrZB+nyjHK_vSsRT3FgjAqw@mail.gmail.com","threadId":"58568","inReplyTo":null,"subject":"Request for a \"connected mode\" -- server-side command execution","fromName":"Alireza","fromEmail":"rezaxm@gmail.com","sentAt":"2022-10-05T11:23:00Z","receivedAt":"2022-10-05T11:23:40Z","isPatch":false,"sender":{"key":"rezaxm@gmail.com","avatar":null},"body":"There are a few mechanisms already to improve perf in big repositories\nbut they all need a change in usage flow. I had this idea for a while\nnow and I'd appreciate your feedback on it.\n\nThe \"connected mode\" essentially means to run all git commands on the\nserver and only download relevant stuff locally. To demonstrate the\nusage flow:\n\ngit clone --connected <url> # new repo\ngit config fetch.connected true # existing repo\n\nFrom there, git is to decide whether or not a command should be sent\nto the server. For instance, if all required refs are present locally,\nit's run on the machine, otherwise it's sent to the server, collecting\nthe result and possibly a minimum set of new objects. From the user's\nperspective, all commands are run on the latest revision without an\nexplicit (possibly extensive) fetch.\n\nThis would make a --connected clone implicitly shallow, but new data\ncan be downloaded on demand. User flow is not changed in any other\nways.\n\nThanks,\n"},{"id":"464267","messageId":"Yz4DDxe6oGCOH0hI@tapette.crustytoothpaste.net","threadId":"58568","inReplyTo":"CAD9n_qiXZ9xDkJsG0mMmYoVpM8LXrZB+nyjHK_vSsRT3FgjAqw@mail.gmail.com","subject":"Re: Request for a \"connected mode\" -- server-side command execution","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2022-10-05T22:19:59Z","receivedAt":"2022-10-05T22:20:07Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2022-10-05 at 11:23:00, Alireza wrote:\n> There are a few mechanisms already to improve perf in big repositories\n> but they all need a change in usage flow. I had this idea for a while\n> now and I'd appreciate your feedback on it.\n> \n> The \"connected mode\" essentially means to run all git commands on the\n> server and only download relevant stuff locally. To demonstrate the\n> usage flow:\n> \n> git clone --connected <url> # new repo\n> git config fetch.connected true # existing repo\n> \n> From there, git is to decide whether or not a command should be sent\n> to the server. For instance, if all required refs are present locally,\n> it's run on the machine, otherwise it's sent to the server, collecting\n> the result and possibly a minimum set of new objects. From the user's\n> perspective, all commands are run on the latest revision without an\n> explicit (possibly extensive) fetch.\n> \n> This would make a --connected clone implicitly shallow, but new data\n> can be downloaded on demand. User flow is not changed in any other\n> ways.\n\nI think you may be interested in partial clone (e.g., a clone with\n`--filter=blob:none`), which can download the commits and trees but not\nthe blobs for a repository.  The blobs are then automatically downloaded\nfrom the remote on demand.\n\nThere are other partial clone filters, but that particular one is the\nmost common and the best supported.  Note that in this case, the history\nis complete and the repository is not shallow; only the blobs are\nmissing.\n\nAs for performing the work on the server side, I feel like that is\nunlikely to happen, since it's very hard to account for the security\nconcerns running arbitrary commands as well as the potential unbounded\ncomputational cost.  Therefore, it's not likely that most providers\nwould implement a feature if it were added.\n-- \nbrian m. carlson (he/him or they/them)\nToronto, Ontario, CA\n"}]}