{"thread":{"id":"8786","subject":"Non-http dumb protocols","startedAt":"2007-06-30T20:19:00Z","lastAt":"2007-07-01T20:53:33Z","messageCount":6,"participants":["Daniel Barkalow","Junio C Hamano","Julian Phillips","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"46126","messageId":"Pine.LNX.4.64.0706301613410.14638@iabervon.org","threadId":"8786","inReplyTo":null,"subject":"Non-http dumb protocols","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2007-06-30T20:19:00Z","receivedAt":"2007-06-30T20:19:00Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"Do we actually support local-fetch and ssh-fetch/ssh-push any more? They \nseem to me to have been entirely supplanted with respect to functionality \nfor a long time now, but the programs are still there. This complicates \nhttp-fetch, because only one -fetch can be linked into a binary as \ncurrently designed, and we may want to make http-fetch builtin at some \npoint. Can we remove the other dumb protocols and merge fetch.c into \nhttp-fetch.c?\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"46140","messageId":"7vbqewakz8.fsf@assigned-by-dhcp.cox.net","threadId":"8786","inReplyTo":"Pine.LNX.4.64.0706301613410.14638@iabervon.org","subject":"Re: Non-http dumb protocols","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-01T02:58:19Z","receivedAt":"2007-07-01T02:58:19Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Daniel Barkalow <barkalow@iabervon.org> writes:\n\n> Do we actually support local-fetch and ssh-fetch/ssh-push any more? They \n> seem to me to have been entirely supplanted with respect to functionality \n> for a long time now, but the programs are still there. This complicates \n> http-fetch, because only one -fetch can be linked into a binary as \n> currently designed, and we may want to make http-fetch builtin at some \n> point. Can we remove the other dumb protocols and merge fetch.c into \n> http-fetch.c?\n\nI have a feeling that nobody uses commit walkers other than\nhttp.  I do not see a point in ssh-fetch/push (we said it is\ndeprecated long time ago, and I was just too lazy to propose and\nactually remove it when I did 1.5.2).  local-fetch _might_ be\nuseful as a debugging tool when you have trouble not related to\nlibcurl in http-fetch, but other than that I do not see a point\nto it either.  \n\nI am personally Ok with removing them on the sole basis of \"they\nare practically disused\"; but there may be people on the list\nwith different opinions (at least here, they are not stupid nor\nugly).\n\nHowever, from \"technical\" point of view, I do not think the\ncommit walker framework \"fetch.c\" is beyond salvaging, as you\nmake it sound, to make it a built-in.  The commit walker\nframework was your work IIRC, so this may be preaching to the\nchoir, but my understanding is that it wants the following\nfunctions defined in the transport backend module:\n\n    extern int fetch(unsigned char *sha1);\n    extern void prefetch(unsigned char *sha1);\n    extern int fetch_ref(char *ref, unsigned char *sha1);\n\nand exports the following symbols to be set:\n\n    extern int get_tree;\n    extern int get_history;\n    extern int get_all;\n    extern int get_verbosely;\n    extern int get_recover;\n\nI think you could define\n\n\tstruct fetch_backend {\n\t\tint (*fetch_fn)(const unsigned char *);\n\t\tvoid (*prefetch_fn)(const unsigned char *);\n\t\tint (*fetch_ref_fn)(const char *, const unsigned char *);\n\t\tint get_tree;\n\t\tint get_history;\n\t\tint get_all;\n\t\tint get_verbosely;\n\t\tint get_recover;\n\t};\n\nand have the backend \"main()\" pass a pointer to it to functions\npull(), pull_targets_stdin() and such, that are defined in\nfetch.c.  That way, you can have multiple backend linked in.\n\nTo be linked with the rest of git, I think the global symbols\nfetch.c has are named a little too generically, and they would\nneed to be fixed first.  It may make sense to do the \"backend\ndescriptor\" code restructure first _before_ linking anything\nwith the rest of git.  We can rename main() in *-fetch.c to\ncmd_*_fetch() only for the ones that we choose to make built-in\nwhen the conversion is ready.\n\nHaving said that, I have a feeling that many people do not build\nany of the commit walkers, and especially the http walker,\nbecause they have no need for dumb protocols, and libcurl-dev is\njust another piece of dependency they do not have to have.  If\nwe were to do a built-in http-fetch, we also need to make sure \nit is done in such a way that people can choose to configure it\nout.\n"},{"id":"46149","messageId":"Pine.LNX.4.64.0707010646461.22915@beast.quantumfyre.co.uk","threadId":"8786","inReplyTo":"7vbqewakz8.fsf@assigned-by-dhcp.cox.net","subject":"Re: Non-http dumb protocols","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-07-01T05:48:37Z","receivedAt":"2007-07-01T05:48:37Z","isPatch":false,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"On Sat, 30 Jun 2007, Junio C Hamano wrote:\n\n> Daniel Barkalow <barkalow@iabervon.org> writes:\n>\n>> Do we actually support local-fetch and ssh-fetch/ssh-push any more? They\n>> seem to me to have been entirely supplanted with respect to functionality\n>> for a long time now, but the programs are still there. This complicates\n>> http-fetch, because only one -fetch can be linked into a binary as\n>> currently designed, and we may want to make http-fetch builtin at some\n>> point. Can we remove the other dumb protocols and merge fetch.c into\n>> http-fetch.c?\n\n\n> To be linked with the rest of git, I think the global symbols\n> fetch.c has are named a little too generically, and they would\n> need to be fixed first.  It may make sense to do the \"backend\n> descriptor\" code restructure first _before_ linking anything\n> with the rest of git.  We can rename main() in *-fetch.c to\n> cmd_*_fetch() only for the ones that we choose to make built-in\n> when the conversion is ready.\n>\n> Having said that, I have a feeling that many people do not build\n> any of the commit walkers, and especially the http walker,\n> because they have no need for dumb protocols, and libcurl-dev is\n> just another piece of dependency they do not have to have.  If\n> we were to do a built-in http-fetch, we also need to make sure\n> it is done in such a way that people can choose to configure it\n> out.\n\nAs part of making fetch a builtin, I also made http-fetch a builtin so\nthat I reuse some of the code.  When I did this it kept the same optional\nbuild status as the original separate program.  Since Daniel based his\nwork on mine, he should have this change too ... however I didn't do any \nrenaming of symbols in builtin-http-fetch.c other than the minimum \nnecessary to make it a builtin.\n\n-- \nJulian\n\n  ---\nTaxes are going up so fast, the government is likely to price itself\nout of the market.\n"},{"id":"46170","messageId":"Pine.LNX.4.64.0707011527590.4438@racer.site","threadId":"8786","inReplyTo":"7vbqewakz8.fsf@assigned-by-dhcp.cox.net","subject":"Re: Non-http dumb protocols","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-01T14:32:16Z","receivedAt":"2007-07-01T14:32:16Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 30 Jun 2007, Junio C Hamano wrote:\n\n> Having said that, I have a feeling that many people do not build\n> any of the commit walkers, and especially the http walker,\n> because they have no need for dumb protocols, and libcurl-dev is\n> just another piece of dependency they do not have to have.\n\nInterestingly, I just was involved in a discussion on IRC, where somebody \n(out of quotat concerns) wants to use sftp to push to a bare repository, \nwhich is served via HTTP.\n\nUnfortunately, it seems that all persons wanting to have some support for \nthat, expect others to do the work for them.\n\nHowever, there is a miniscule non-zero chance that eventually somebody \nmight want to realise an sftp push protocol (where you basically need the \nls-remote part of the fetcher, too, to determine what to pack and send). \nAnd to complete a dumb sftp fetch protocol, you'd need a commit walker,\nso I'd like to have at least a minimal interface for commit walkers \nwaiting for that saviour.\n\nCiao,\nDscho\n"},{"id":"46190","messageId":"Pine.LNX.4.64.0707011444300.14638@iabervon.org","threadId":"8786","inReplyTo":"Pine.LNX.4.64.0707011527590.4438@racer.site","subject":"Re: Non-http dumb protocols","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2007-07-01T18:47:33Z","receivedAt":"2007-07-01T18:47:33Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Sun, 1 Jul 2007, Johannes Schindelin wrote:\n\n> Hi,\n> \n> On Sat, 30 Jun 2007, Junio C Hamano wrote:\n> \n> > Having said that, I have a feeling that many people do not build\n> > any of the commit walkers, and especially the http walker,\n> > because they have no need for dumb protocols, and libcurl-dev is\n> > just another piece of dependency they do not have to have.\n> \n> Interestingly, I just was involved in a discussion on IRC, where somebody \n> (out of quotat concerns) wants to use sftp to push to a bare repository, \n> which is served via HTTP.\n> \n> Unfortunately, it seems that all persons wanting to have some support for \n> that, expect others to do the work for them.\n> \n> However, there is a miniscule non-zero chance that eventually somebody \n> might want to realise an sftp push protocol (where you basically need the \n> ls-remote part of the fetcher, too, to determine what to pack and send). \n> And to complete a dumb sftp fetch protocol, you'd need a commit walker,\n> so I'd like to have at least a minimal interface for commit walkers \n> waiting for that saviour.\n\nOkay, I think I'll go for ditching ssh-fetch/-push, making the \ncommit-walker code more modular, and possibly moving more of the smarts of \nhttp-fetch into the common code so that local-fetch is a better test for \nit and sftp fetch would be possible.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"46193","messageId":"Pine.LNX.4.64.0707012153190.4438@racer.site","threadId":"8786","inReplyTo":"Pine.LNX.4.64.0707011444300.14638@iabervon.org","subject":"Re: Non-http dumb protocols","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-01T20:53:33Z","receivedAt":"2007-07-01T20:53:33Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 1 Jul 2007, Daniel Barkalow wrote:\n\n> Okay, I think I'll go for ditching ssh-fetch/-push, making the \n> commit-walker code more modular, and possibly moving more of the smarts \n> of http-fetch into the common code so that local-fetch is a better test \n> for it and sftp fetch would be possible.\n\nThanks,\nDscho\n"}]}