{"thread":{"id":"10160","subject":"[PATCH] git-shell and git-cvsserver","startedAt":"2007-10-05T12:53:47Z","lastAt":"2007-10-10T19:10:25Z","messageCount":10,"participants":["Jan Wielemaker","Miklos Vajna","Frank Lichtenheld","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"54948","messageId":"200710051453.47622.wielemak@science.uva.nl","threadId":"10160","inReplyTo":null,"subject":"[PATCH] git-shell and git-cvsserver","fromName":"Jan Wielemaker","fromEmail":"wielemak@science.uva.nl","sentAt":"2007-10-05T12:53:47Z","receivedAt":"2007-10-05T12:53:47Z","isPatch":true,"sender":{"key":"wielemak@science.uva.nl","avatar":null},"body":"Hi,\n\nI know, I shouldn't be using git-cvsserver :-( Anyway, I patched\ngit-shell to start git-cvsserver if it is started interactively and the\none and only line given to it is \"cvs server\".\n\nThe patch to shell.c is below. The trick with the EXEC_PATH is needed\nbecause git-cvsserver doesn't appear to be working if you do not include\nthe git bindir in $PATH. I think that should be fixed in git-cvsserver\nand otherwise we should at least make the value come from the prefix\nmake variable.  With this patch I was able to use both Unix and Windows\ncvs clients using git-shell as login shell.\n\nNote that you must provide ~/.gitconfig with user and email in the\nrestricted environment.\n\n\tEnjoy --- Jan\n\n\n--- shell.c.org\t2007-10-05 13:08:47.000000000 +0200\n+++ shell.c\t2007-10-05 14:24:11.000000000 +0200\n@@ -18,27 +18,80 @@\n \treturn execv_git_cmd(my_argv);\n }\n \n+#define EXEC_PATH \"/usr/local/bin\"\n+\n+static int do_cvs_cmd(const char *me, char *arg)\n+{\n+\tconst char *my_argv[4];\n+\tconst char *oldpath;\n+\n+\tif ( !arg )\n+\t\tdie(\"no argument\");\n+\tif ( strcmp(arg, \"server\") )\n+\t\tdie(\"only allows git-cvsserver server: %s\", arg);\n+\n+\tmy_argv[0] = \"cvsserver\";\n+\tmy_argv[1] = \"server\";\n+\tmy_argv[2] = NULL;\n+\n+\tif ( (oldpath=getenv(\"PATH\")) ) {\n+\t\tchar *newpath = malloc(strlen(oldpath)+strlen(EXEC_PATH)+5+1+1);\n+\t\t\n+\t\tsprintf(newpath, \"PATH=%s:%s\", EXEC_PATH, oldpath);\n+\t\tputenv(newpath);\n+\t} else {\n+\t\tchar *newpath = malloc(strlen(EXEC_PATH)+5+1);\n+\t\t\n+\t\tsprintf(newpath, \"PATH=%s\", EXEC_PATH);\n+\t\tputenv(newpath);\n+\t}\n+\n+\treturn execv_git_cmd(my_argv);\n+}\n+\n+\n static struct commands {\n \tconst char *name;\n \tint (*exec)(const char *me, char *arg);\n } cmd_list[] = {\n \t{ \"git-receive-pack\", do_generic_cmd },\n \t{ \"git-upload-pack\", do_generic_cmd },\n+\t{ \"cvs\", do_cvs_cmd },\n \t{ NULL },\n };\n \n int main(int argc, char **argv)\n {\n \tchar *prog;\n+\tchar buf[256];\n \tstruct commands *cmd;\n \n \t/* We want to see \"-c cmd args\", and nothing else */\n-\tif (argc != 3 || strcmp(argv[1], \"-c\"))\n-\t\tdie(\"What do you think I am? A shell?\");\n+\tif (argc == 1) {\n+\t\tif (fgets(buf, sizeof(buf)-1, stdin)) {\n+\t\t\tchar *end;\n+\n+\t\t\tif ( (end=strchr(buf, '\\n')) )\n+\t\t\t{\twhile(end>buf && end[-1] <= ' ')\n+\t\t\t\t\tend--;\n+\t\t\t\t*end = '\\0';\n+\t\t\t} else {\n+\t\t\t\tdie(\"Bad command\");\n+\t\t\t}\n+\n+\t\t\tprog = buf;\n+\t\t} else {\n+\t\t\tdie(\"No command\");\n+\t\t}\n+\t} else {\n+\t\tif (argc != 3 || strcmp(argv[1], \"-c\"))\n+\t\t\tdie(\"What do you think I am? A shell?\");\n+\n+\t\tprog = argv[2];\n+\t\targv += 2;\n+\t\targc -= 2;\n+\t}\n \n-\tprog = argv[2];\n-\targv += 2;\n-\targc -= 2;\n \tfor (cmd = cmd_list ; cmd->name ; cmd++) {\n \t\tint len = strlen(cmd->name);\n \t\tchar *arg;\n"},{"id":"54955","messageId":"20071005143135.GO15339@genesis.frugalware.org","threadId":"10160","inReplyTo":"200710051453.47622.wielemak@science.uva.nl","subject":"Re: [PATCH] git-shell and git-cvsserver","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2007-10-05T14:31:35Z","receivedAt":"2007-10-05T14:31:35Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Fri, Oct 05, 2007 at 02:53:47PM +0200, Jan Wielemaker <wielemak@science.uva.nl> wrote:\n> +#define EXEC_PATH \"/usr/local/bin\"\n\nwhy don't you use $(prefix) from the Makefile?\n\n- VMiklos\n"},{"id":"54959","messageId":"20071005150717.GN31659@planck.djpig.de","threadId":"10160","inReplyTo":"200710051453.47622.wielemak@science.uva.nl","subject":"Re: [PATCH] git-shell and git-cvsserver","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-10-05T15:07:17Z","receivedAt":"2007-10-05T15:07:17Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Fri, Oct 05, 2007 at 02:53:47PM +0200, Jan Wielemaker wrote:\n> +#define EXEC_PATH \"/usr/local/bin\"\n> +\n> +static int do_cvs_cmd(const char *me, char *arg)\n> +{\n> +\tconst char *my_argv[4];\n> +\tconst char *oldpath;\n> +\n> +\tif ( !arg )\n> +\t\tdie(\"no argument\");\n> +\tif ( strcmp(arg, \"server\") )\n> +\t\tdie(\"only allows git-cvsserver server: %s\", arg);\n> +\n> +\tmy_argv[0] = \"cvsserver\";\n> +\tmy_argv[1] = \"server\";\n> +\tmy_argv[2] = NULL;\n> +\n> +\tif ( (oldpath=getenv(\"PATH\")) ) {\n> +\t\tchar *newpath = malloc(strlen(oldpath)+strlen(EXEC_PATH)+5+1+1);\n> +\t\t\n> +\t\tsprintf(newpath, \"PATH=%s:%s\", EXEC_PATH, oldpath);\n> +\t\tputenv(newpath);\n> +\t} else {\n> +\t\tchar *newpath = malloc(strlen(EXEC_PATH)+5+1);\n> +\t\t\n> +\t\tsprintf(newpath, \"PATH=%s\", EXEC_PATH);\n> +\t\tputenv(newpath);\n> +\t}\n> +\n> +\treturn execv_git_cmd(my_argv);\n> +}\n\nThis seems to be mostly a duplication of prepend_to_path from git.c\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"55156","messageId":"Pine.LNX.4.64.0710080534270.4174@racer.site","threadId":"10160","inReplyTo":"200710051453.47622.wielemak@science.uva.nl","subject":"Re: [PATCH] git-shell and git-cvsserver","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-08T04:51:19Z","receivedAt":"2007-10-08T04:51:19Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 5 Oct 2007, Jan Wielemaker wrote:\n\n> Hi,\n> \n> I know, I shouldn't be using git-cvsserver :-( Anyway, I patched\n> git-shell to start git-cvsserver if it is started interactively and the\n> one and only line given to it is \"cvs server\".\n> \n> The patch to shell.c is below. The trick with the EXEC_PATH is needed\n> because git-cvsserver doesn't appear to be working if you do not include\n> the git bindir in $PATH. I think that should be fixed in git-cvsserver\n> and otherwise we should at least make the value come from the prefix\n> make variable.  With this patch I was able to use both Unix and Windows\n> cvs clients using git-shell as login shell.\n> \n> Note that you must provide ~/.gitconfig with user and email in the\n> restricted environment.\n> \n> \tEnjoy --- Jan\n\nI think this is a valuable contribution.  That's why I comment...\n\nPlease put a useful commit message (less like an email, more like \nsomething you want to read in git-log) at the beginning of the email, then \na line containing _just_ \"---\", and after that some comments that are not \nmeant to be stored in the history, like (I know this does not belong \nto...)\n\nAfter that, there should be a diffstat, and then the patch.\n\nThe easiest to have this layout is to do a proper commit in git, use \"git \nformat-patch\" to produce the patch, and then insert what you want to say \nin addition to the commit message between the \"---\" marker and the \ndiffstat.\n\nI strongly disagree (as you yourself, probably) with the notion that this \ndoes not belong into git-shell.\n\n\n> +#define EXEC_PATH \"/usr/local/bin\"\n\nThis is definitely wrong.  Use git_exec_path() instead.\n\n> +static int do_cvs_cmd(const char *me, char *arg)\n> +{\n> +\tconst char *my_argv[4];\n\nMaybe rename this to cvsserver_args?\n\n> +\tconst char *oldpath;\n> +\n> +\tif ( !arg )\n> +\t\tdie(\"no argument\");\n> +\tif ( strcmp(arg, \"server\") )\n> +\t\tdie(\"only allows git-cvsserver server: %s\", arg);\n> +\n> +\tmy_argv[0] = \"cvsserver\";\n> +\tmy_argv[1] = \"server\";\n> +\tmy_argv[2] = NULL;\n> +\n> +\tif ( (oldpath=getenv(\"PATH\")) ) {\n\nPlease lose the spaces after the opening and before the closing brackets.  \nAnd put spaces around the \"=\" sign.\n\nIt is really distracting to read different styles of code in the same \nproject, and that's why we're pretty anal about coding styles.  Just have \na look (in the same file) how we write things, and imitate it as closely \nas possible.\n\n> +\t\tchar *newpath = malloc(strlen(oldpath)+strlen(EXEC_PATH)+5+1+1); > +\t\t\n> +\t\tsprintf(newpath, \"PATH=%s:%s\", EXEC_PATH, oldpath);\n> +\t\tputenv(newpath);\n> +\t} else {\n> +\t\tchar *newpath = malloc(strlen(EXEC_PATH)+5+1);\n> +\t\t\n> +\t\tsprintf(newpath, \"PATH=%s\", EXEC_PATH);\n> +\t\tputenv(newpath);\n> +\t}\n\nYou have redundant \"putenv(newpath);\" in both clauses.  AFAICT putenv() is \ndeprecated, too, and we use setenv() elsewhere.\n\nIn addition, I strongly suggest using strbuf:\n\n\tstruct strbuf newpath = STRBUF_INIT;\n\n\tstrbuf_addstr(&newpath, git_exec_path());\n\tif ((oldpath = getenv(\"PATH\"))) {\n\t\tstrbuf_addch(&newpath, ':');\n\t\tstrbuf_addstr(&newpath, oldpath);\n\t}\n\n\tsetenv(\"PATH\", strbuf_detach(&newpath, NULL), 1);\n\n> +\treturn execv_git_cmd(my_argv);\n\n... and then you call execv_git_cmd(), which already does all the details \nof setting up the exec dir correctly AFAIR.\n\n>  int main(int argc, char **argv)\n>  {\n>  \tchar *prog;\n> +\tchar buf[256];\n>  \tstruct commands *cmd;\n>  \n>  \t/* We want to see \"-c cmd args\", and nothing else */\n> -\tif (argc != 3 || strcmp(argv[1], \"-c\"))\n> -\t\tdie(\"What do you think I am? A shell?\");\n> +\tif (argc == 1) {\n> +\t\tif (fgets(buf, sizeof(buf)-1, stdin)) {\n> +\t\t\tchar *end;\n> +\n> +\t\t\tif ( (end=strchr(buf, '\\n')) )\n> +\t\t\t{\twhile(end>buf && end[-1] <= ' ')\n> +\t\t\t\t\tend--;\n> +\t\t\t\t*end = '\\0';\n> +\t\t\t} else {\n> +\t\t\t\tdie(\"Bad command\");\n> +\t\t\t}\n> +\n> +\t\t\tprog = buf;\n> +\t\t} else {\n> +\t\t\tdie(\"No command\");\n> +\t\t}\n> +\t} else {\n> +\t\tif (argc != 3 || strcmp(argv[1], \"-c\"))\n> +\t\t\tdie(\"What do you think I am? A shell?\");\n> +\n> +\t\tprog = argv[2];\n> +\t\targv += 2;\n> +\t\targc -= 2;\n> +\t}\n\nAnd this is ugly.  If you want to support \"cvs server\", then just check \nfor that string, and if it matches, return execl_git_cmd(\"cvsserver\");\n\nOtherwise proceed as in the original code.\n\nCiao,\nDscho\n"},{"id":"55193","messageId":"200710081622.33222.wielemak@science.uva.nl","threadId":"10160","inReplyTo":"Pine.LNX.4.64.0710080534270.4174@racer.site","subject":"Re: [PATCH] git-shell and git-cvsserver","fromName":"Jan Wielemaker","fromEmail":"wielemak@science.uva.nl","sentAt":"2007-10-08T14:22:33Z","receivedAt":"2007-10-08T14:22:33Z","isPatch":true,"sender":{"key":"wielemak@science.uva.nl","avatar":null},"body":"Dscho,\n\nOn Monday 08 October 2007 06:51, Johannes Schindelin wrote:\n> On Fri, 5 Oct 2007, Jan Wielemaker wrote:\n> > Hi,\n> >\n> > I know, I shouldn't be using git-cvsserver :-( Anyway, I patched\n> > git-shell to start git-cvsserver if it is started interactively and the\n> > one and only line given to it is \"cvs server\".\n> >\n> > The patch to shell.c is below. The trick with the EXEC_PATH is needed\n> > because git-cvsserver doesn't appear to be working if you do not include\n> > the git bindir in $PATH. I think that should be fixed in git-cvsserver\n> > and otherwise we should at least make the value come from the prefix\n> > make variable.  With this patch I was able to use both Unix and Windows\n> > cvs clients using git-shell as login shell.\n> >\n> > Note that you must provide ~/.gitconfig with user and email in the\n> > restricted environment.\n> >\n> > \tEnjoy --- Jan\n>\n> I think this is a valuable contribution.  That's why I comment...\n\nGreat :-)\n\n> Please put a useful commit message (less like an email, more like\n> something you want to read in git-log) at the beginning of the email, then\n> a line containing _just_ \"---\", and after that some comments that are not\n> meant to be stored in the history, like (I know this does not belong\n> to...)\n>\n> After that, there should be a diffstat, and then the patch.\n>\n> The easiest to have this layout is to do a proper commit in git, use \"git\n> format-patch\" to produce the patch, and then insert what you want to say\n> in addition to the commit message between the \"---\" marker and the\n> diffstat.\n\nI buy that.  I'm still trying to get used to all the features ...\n\n> I strongly disagree (as you yourself, probably) with the notion that this\n> does not belong into git-shell.\n>\n> > +#define EXEC_PATH \"/usr/local/bin\"\n>\n> This is definitely wrong.  Use git_exec_path() instead.\n\nI stated in my comments I was not happy about that. Before I start\nsubmitting a new patch that may or may not be accepted, I'd like to have\nsome things clear. I manage an Open Source project for a long time (the\nterm not even invented in 1985 :-) Users come up with problems and\nreport on this. Most often with just a statement they don't like it,\nsometimes with a detailed description of what is wrong and how to fix\nit, sometimes with patches.\n\nGenerally, patches are not really how I like them, precisely the kind\nof things that are wrong with my patch.  Style issues, fixed A where\nI consider the patch must be in B after a conflict between A and B\nwas detected, missing opportunities for code reuse, etc.\n\nI try to talk frequent contributors into making things as `ready-to-use'\nas possible. For incidental contributors I generally don't care. I just\nrewrite the patch. Its less work for me than trying to explain all\ndetails (as you kindly did and I agree to most of it, even learn some\nnew things) and it is too much work for someone who wishes an incidental\npatch in the main distribution.\n\nI don't want to become a GIT comitter, and I don't want to learn all of\nits internals. Just a happy user for the SWI-Prolog project and an\ninternal project with some CVS addicts.\n\n\tCheers --- Jan\n"},{"id":"55257","messageId":"Pine.LNX.4.64.0710091245310.4174@racer.site","threadId":"10160","inReplyTo":"200710081622.33222.wielemak@science.uva.nl","subject":"Re: [PATCH] git-shell and git-cvsserver","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-09T11:51:17Z","receivedAt":"2007-10-09T11:51:17Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 8 Oct 2007, Jan Wielemaker wrote:\n\n> On Monday 08 October 2007 06:51, Johannes Schindelin wrote:\n> \n> > > +#define EXEC_PATH \"/usr/local/bin\"\n> >\n> > This is definitely wrong.  Use git_exec_path() instead.\n> \n> I stated in my comments I was not happy about that.\n\nThat's why I suggested a fix.\n\n> [explaining -- using a lot of words -- no intention to fix the patch]\n\nHeh.  I think that you could have fixed the patch in less time than it \ntook you to write your answer ;-)\n\nCiao,\nDscho\n"},{"id":"55287","messageId":"Pine.LNX.4.64.0710091531360.4174@racer.site","threadId":"10160","inReplyTo":"200710051453.47622.wielemak@science.uva.nl","subject":"[PATCH] Support cvs via git-shell","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-09T14:33:25Z","receivedAt":"2007-10-09T14:33:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nThis adds cvs support to the git-shell; You can now give new users\na restricted git-shell and they still can commit via git's cvs\nemulator.\n\nNote that either the gecos information must be accurate, or you must\nprovide a $HOME/.gitconfig with the appropriate user credentials.\nSince the git-shell is too restricted to allow the user to do it\n(on purpose!), it is up to the administrator to take care of that.\n\nBased on an idea by Jan Wielemaker.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tSince Jan seems to be too busy to do it (in contrast to everybody \n\telse), I ended up implementing my advices myself.  At least that \n\tway, I can take the credit, too, since not many things are left \n\tfrom the original patch.\n\n shell.c |   27 ++++++++++++++++++++++++++-\n 1 files changed, 26 insertions(+), 1 deletions(-)\n\ndiff --git a/shell.c b/shell.c\nindex c983fc7..cfe372b 100644\n--- a/shell.c\n+++ b/shell.c\n@@ -1,6 +1,7 @@\n #include \"cache.h\"\n #include \"quote.h\"\n #include \"exec_cmd.h\"\n+#include \"strbuf.h\"\n \n static int do_generic_cmd(const char *me, char *arg)\n {\n@@ -18,12 +19,34 @@ static int do_generic_cmd(const char *me, char *arg)\n \treturn execv_git_cmd(my_argv);\n }\n \n+static int do_cvs_cmd(const char *me, char *arg)\n+{\n+\tconst char *cvsserver_argv[3] = {\n+\t\t\"cvsserver\", \"server\", NULL\n+\t};\n+\tconst char *oldpath = getenv(\"PATH\");\n+\tstruct strbuf newpath = STRBUF_INIT;\n+\n+\tif (!arg || strcmp(arg, \"server\"))\n+\t\tdie(\"git-cvsserver only handles server: %s\", arg);\n+\n+\tstrbuf_addstr(&newpath, git_exec_path());\n+\tstrbuf_addch(&newpath, ':');\n+\tstrbuf_addstr(&newpath, oldpath);\n+\n+\tsetenv(\"PATH\", strbuf_detach(&newpath, NULL), 1);\n+\n+\treturn execv_git_cmd(cvsserver_argv);\n+}\n+\n+\n static struct commands {\n \tconst char *name;\n \tint (*exec)(const char *me, char *arg);\n } cmd_list[] = {\n \t{ \"git-receive-pack\", do_generic_cmd },\n \t{ \"git-upload-pack\", do_generic_cmd },\n+\t{ \"cvs\", do_cvs_cmd },\n \t{ NULL },\n };\n \n@@ -32,8 +55,10 @@ int main(int argc, char **argv)\n \tchar *prog;\n \tstruct commands *cmd;\n \n+\tif (argc == 2 && !strcmp(argv[1], \"cvs server\"))\n+\t\targv--;\n \t/* We want to see \"-c cmd args\", and nothing else */\n-\tif (argc != 3 || strcmp(argv[1], \"-c\"))\n+\telse if (argc != 3 || strcmp(argv[1], \"-c\"))\n \t\tdie(\"What do you think I am? A shell?\");\n \n \tprog = argv[2];\n-- \n1.5.3.4.1169.g5fb8d\n"},{"id":"55323","messageId":"20071009223538.GG31659@planck.djpig.de","threadId":"10160","inReplyTo":"Pine.LNX.4.64.0710091531360.4174@racer.site","subject":"Re: [PATCH] Support cvs via git-shell","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-10-09T22:35:38Z","receivedAt":"2007-10-09T22:35:38Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Tue, Oct 09, 2007 at 03:33:25PM +0100, Johannes Schindelin wrote:\n>  static struct commands {\n>  \tconst char *name;\n>  \tint (*exec)(const char *me, char *arg);\n>  } cmd_list[] = {\n>  \t{ \"git-receive-pack\", do_generic_cmd },\n>  \t{ \"git-upload-pack\", do_generic_cmd },\n> +\t{ \"cvs\", do_cvs_cmd },\n>  \t{ NULL },\n\nMaybe this should also allow git-cvsserver for completeness' sake?\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"55362","messageId":"Pine.LNX.4.64.0710101427160.4174@racer.site","threadId":"10160","inReplyTo":"20071009223538.GG31659@planck.djpig.de","subject":"Re: [PATCH] Support cvs via git-shell","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-10T13:29:00Z","receivedAt":"2007-10-10T13:29:00Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 10 Oct 2007, Frank Lichtenheld wrote:\n\n> On Tue, Oct 09, 2007 at 03:33:25PM +0100, Johannes Schindelin wrote:\n> >  static struct commands {\n> >  \tconst char *name;\n> >  \tint (*exec)(const char *me, char *arg);\n> >  } cmd_list[] = {\n> >  \t{ \"git-receive-pack\", do_generic_cmd },\n> >  \t{ \"git-upload-pack\", do_generic_cmd },\n> > +\t{ \"cvs\", do_cvs_cmd },\n> >  \t{ NULL },\n> \n> Maybe this should also allow git-cvsserver for completeness' sake?\n\nUmm.  Why?\n\nIf you use a cvs client with :ext: protocol, it will call ssh (or rsh!) \nwith the command \"cvs server\", not \"git-cvsserver\".\n\nOnly in setups where you set (IIRC) the environment variable \"CVSSERVER\" \non the client to \"git-cvsserver\" will it call something different, but \nthese setups exist already, and never used git-shell to begin with.\n\nCiao,\nDscho\n"},{"id":"55397","messageId":"20071010191025.GJ31659@planck.djpig.de","threadId":"10160","inReplyTo":"Pine.LNX.4.64.0710101427160.4174@racer.site","subject":"Re: [PATCH] Support cvs via git-shell","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-10-10T19:10:25Z","receivedAt":"2007-10-10T19:10:25Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Wed, Oct 10, 2007 at 02:29:00PM +0100, Johannes Schindelin wrote:\n> On Wed, 10 Oct 2007, Frank Lichtenheld wrote:\n> > On Tue, Oct 09, 2007 at 03:33:25PM +0100, Johannes Schindelin wrote:\n> > >  static struct commands {\n> > >  \tconst char *name;\n> > >  \tint (*exec)(const char *me, char *arg);\n> > >  } cmd_list[] = {\n> > >  \t{ \"git-receive-pack\", do_generic_cmd },\n> > >  \t{ \"git-upload-pack\", do_generic_cmd },\n> > > +\t{ \"cvs\", do_cvs_cmd },\n> > >  \t{ NULL },\n> > \n> > Maybe this should also allow git-cvsserver for completeness' sake?\n> \n> Umm.  Why?\n\nSymmetry? ;)\nThe \"for completeness' sake\" was as good a reason as I could think of.\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"}]}