Why various git commands are available only locally? -


the number of commands can run agains remote repository using standard clients limited.
of remote commands provided git-ls-remote. limitation of git client or of git server?

i write client provides of commands can run locally run on remote repository too.

a case fetch logs (i.e. git log) reason of question. current practice use proprietary api developed whatever service hosting git repostiory (github, gitlab, gerrit, bitbucket, stash etc) think client developed using standard git protocol sort out issue.

i think client developed using standard git protocol sort out issue.

that revert decentralized model of git (where every operation local , fast) centralized 1 (where need access server perform operation.

most of commands (logs, diff, commit, ...) make sense when have full repo.

if git server provides data want develop client puts these apis out of business.

there no "git server", listeners (httpd or sshd) call git-receive-pack , git-upload-pack (in case of smart protocol).

http://stefan.saasen.me/articles/git-clone-in-haskell-from-the-bottom-up/images/pack-client-server.png

(from "reimplementing “git clone” in haskell bottom up")

that why api developed on top of listeners, in order expose commands (local repos managed hosting server).


one alternative aware of gitolite site local commands.
gitolite authentication layer (called listener https or ssh, , checking right of user access repo).
can delegate commands executed "locally" on server:

the main purpose of gitolite prevent getting shell. there commands need run on server (i.e., cannot done pushing repo).

to enable this, gitolite allows admin setup scripts in special directory users can run. gitolite comes set of working scripts admin may install, or may use starting point own, if chooses.

think of these commands equivalent in command_dir in man git-shell.


possible extension: see "announcing gittorrent: decentralized github "

this example of getting git server else pack files.

using different protocol can make git clone return else full repo:

git clone gittorrent://github.com/cjb/recursers 

git has extensible mechanism network protocols built in. way works git clone line gets turned “run git-remote-gittorrent command , give url argument”.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -