With projects like isomorphic-git, the exciting potential becomes closer for web applications to offer out-of-the-box version control using well-known APIs and where users can interact with their own portable, site-agnostic data stores (though sadly, without any globalStorage
-type solutions existing in the browser, only with remote site-agnostic data stores).
However, with the security model of Git being apparently focused on the whole repository and with the inability of Git to fetch/clone only a single portion of a repository (whether blob, tree, or commit objects), a problem occurs when facing the need, particularly of web applications, to host data beyond entire code repositories (e.g., snippets or snapshots of a single page/data object a user would like to offline--e.g., from let's say a future offline Wikipedia web app).
Do any extension protocols (or custom implementations) exist that allow Git servers to transmit merely a portion of a repository (and unlike svn export
, allow pushing back changes to the server)? I'd imagine that one could scrape Git web server responses, but I'd like to know whether any REST (or websocket) protocols (or, if not, custom software) exist to make interaction with a web client more practical, e.g., with JSON responses (and ideally with authentication and granular authorization).
I'm aware of sparse checkout with shallow clones, but I'd to minimize network traffic, I'd be interested in the potential to retrieve single blob, tree, or commit objects.