{"thread":{"id":"24811","subject":"[PATCH] shell: Rewrite documentation and improve error message","startedAt":"2010-08-20T19:44:12Z","lastAt":"2010-08-24T19:01:15Z","messageCount":10,"participants":["Ramkumar Ramachandra","Greg Brockman","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"148602","messageId":"1282333452-25278-1-git-send-email-artagnon@gmail.com","threadId":"24811","inReplyTo":null,"subject":"[PATCH] shell: Rewrite documentation and improve error message","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-20T19:44:12Z","receivedAt":"2010-08-20T19:44:12Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Update the documentation of 'git shell' to mention the interactive\nmode and COMMAND_DIR. Also provide a hint when interactive mode is not\navailable in the shell.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\nCc: Greg Brockman <gdb@MIT.EDU>\nCc: Petr Baudis <pasky@suse.cz>\n---\n Documentation/git-receive-pack.txt |    2 +-\n Documentation/git-shell.txt        |   27 ++++++++++++++++-----------\n shell.c                            |    7 +++++--\n 3 files changed, 22 insertions(+), 14 deletions(-)\n\ndiff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt\nindex 2790eeb..2b07e44 100644\n--- a/Documentation/git-receive-pack.txt\n+++ b/Documentation/git-receive-pack.txt\n@@ -8,7 +8,7 @@ git-receive-pack - Receive what is pushed into the repository\n \n SYNOPSIS\n --------\n-'git-receive-pack' <directory>\n+'git receive-pack' <directory>\n \n DESCRIPTION\n -----------\ndiff --git a/Documentation/git-shell.txt b/Documentation/git-shell.txt\nindex 0f3ad81..c9f1dc9 100644\n--- a/Documentation/git-shell.txt\n+++ b/Documentation/git-shell.txt\n@@ -3,24 +3,29 @@ git-shell(1)\n \n NAME\n ----\n-git-shell - Restricted login shell for GIT-only SSH access\n+git-shell - Restricted login shell for Git-only SSH access\n \n \n SYNOPSIS\n --------\n-'$(git --exec-path)/git-shell' -c <command> <argument>\n+'git shell' [-c <command> <argument>]\n \n DESCRIPTION\n -----------\n-This is meant to be used as a login shell for SSH accounts you want\n-to restrict to GIT pull/push access only. It permits execution only\n-of server-side GIT commands implementing the pull/push functionality.\n-The commands can be executed only by the '-c' option; the shell is not\n-interactive.\n-\n-Currently, only four commands are permitted to be called, 'git-receive-pack'\n-'git-upload-pack' and 'git-upload-archive' with a single required argument, or\n-'cvs server' (to invoke 'git-cvsserver').\n+\n+A login shell for SSH accounts to provide restricted Git access. When\n+'-c' is given, the program executes <command> non-interactively;\n+<command> can be one of 'git receive-pack', 'git upload-pack', 'git\n+upload-archive', 'cvs server', or a command in COMMAND_DIR. The shell\n+is started in interactive mode when no arguments are given; in this\n+case, COMMAND_DIR must exist, and any of the executables in them can\n+be invoked.\n+\n+'cvs server' is a special command which executes git-cvsserver.\n+\n+COMMAND_DIR is the path 'git-shell-commands' in the user's home\n+directory. The user must have read and execute permissions to the\n+directory for it to be useful.\n \n Author\n ------\ndiff --git a/shell.c b/shell.c\nindex ffed615..3fb804e 100644\n--- a/shell.c\n+++ b/shell.c\n@@ -152,8 +152,11 @@ int main(int argc, char **argv)\n \t} else if (argc == 1) {\n \t\t/* Allow the user to run an interactive shell */\n \t\tcd_to_homedir();\n-\t\tif (access(COMMAND_DIR, R_OK | X_OK) == -1)\n-\t\t\tdie(\"Sorry, the interactive git-shell is not enabled\");\n+\t\tif (access(COMMAND_DIR, R_OK | X_OK) == -1) {\n+\t\t\tdie(\"Inteactive git shell is not enabled.\\n\"\n+\t\t\t    \"hint: \" COMMAND_DIR \" should exist \"\n+\t\t\t    \"and have read and execute access.\");\n+\t\t}\n \t\trun_shell();\n \t\texit(0);\n \t} else if (argc != 3 || strcmp(argv[1], \"-c\")) {\n-- \n1.7.2.2.409.gdbb11.dirty\n"},{"id":"148604","messageId":"20100820195139.GD6211@kytes","threadId":"24811","inReplyTo":"1282333452-25278-1-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH] shell: Rewrite documentation and improve error message","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-20T19:51:41Z","receivedAt":"2010-08-20T19:51:41Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi,\n\nRamkumar Ramachandra writes:\n> Update the documentation of 'git shell' to mention the interactive\n> mode and COMMAND_DIR. Also provide a hint when interactive mode is not\n> available in the shell.\n> \n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> Cc: Greg Brockman <gdb@MIT.EDU>\n> Cc: Petr Baudis <pasky@suse.cz>\n> ---\n>  Documentation/git-receive-pack.txt |    2 +-\n\nI'm sorry this stray change crept in. It's not relevant to this patch.\n\n> diff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt\n> index 2790eeb..2b07e44 100644\n> --- a/Documentation/git-receive-pack.txt\n> +++ b/Documentation/git-receive-pack.txt\n> @@ -8,7 +8,7 @@ git-receive-pack - Receive what is pushed into the repository\n>  \n>  SYNOPSIS\n>  --------\n> -'git-receive-pack' <directory>\n> +'git receive-pack' <directory>\n\nQuick fixup:\n-- 8< --\ndiff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt\nindex 2b07e44..2790eeb 100644\n--- a/Documentation/git-receive-pack.txt\n+++ b/Documentation/git-receive-pack.txt\n@@ -8,7 +8,7 @@ git-receive-pack - Receive what is pushed into the repository\n \n SYNOPSIS\n --------\n-'git receive-pack' <directory>\n+'git-receive-pack' <directory>\n \n DESCRIPTION\n -----------\n"},{"id":"148694","messageId":"AANLkTi=u7VUhz4VrU2hdd3SXK7rMvMrijL-X9qXCG1vs@mail.gmail.com","threadId":"24811","inReplyTo":"1282333452-25278-1-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH] shell: Rewrite documentation and improve error message","fromName":"Greg Brockman","fromEmail":"gdb@mit.edu","sentAt":"2010-08-22T06:00:22Z","receivedAt":"2010-08-22T06:00:22Z","isPatch":true,"sender":{"key":"gdb@mit.edu","avatar":"https://gravatar.com/avatar/3b907cf60d0cadf6d0659d5429d971b16965fb6b1e3f5acd26a6ba2974b45da4?d=mp&s=160"},"body":"Warning: the following email contains lots of nitpicks.  Proceed at\nyour own risk.\n\n> +A login shell for SSH accounts to provide restricted Git access. When\n> +'-c' is given, the program executes <command> non-interactively;\n> +<command> can be one of 'git receive-pack', 'git upload-pack', 'git\n> +upload-archive', 'cvs server', or a command in COMMAND_DIR. The shell\n> +is started in interactive mode when no arguments are given; in this\n> +case, COMMAND_DIR must exist, and any of the executables in them can\ns/in them/in it/\n\n> +COMMAND_DIR is the path 'git-shell-commands' in the user's home\n> +directory. The user must have read and execute permissions to the\n- Maybe instead 'COMMAND_DIR is the path \"$HOME/git-shell-commands\"'?\n> +directory for it to be useful.\n- I would be more specific here, and instead change this insertion to\nsomething like: \"directory in order to execute commands in it.\"\n- What about adding something like 'Commands in COMMAND_DIR are run\nwith a cwd of $HOME'\n- Perhaps note that if a COMMAND_DIR program is invoked, 'argument' is\nparsed as a command-line?\n\n>\n>  Author\n>  ------\n> diff --git a/shell.c b/shell.c\n> index ffed615..3fb804e 100644\n> --- a/shell.c\n> +++ b/shell.c\n> @@ -152,8 +152,11 @@ int main(int argc, char **argv)\n>        } else if (argc == 1) {\n>                /* Allow the user to run an interactive shell */\n>                cd_to_homedir();\n> -               if (access(COMMAND_DIR, R_OK | X_OK) == -1)\n> -                       die(\"Sorry, the interactive git-shell is not enabled\");\n> +               if (access(COMMAND_DIR, R_OK | X_OK) == -1) {\n> +                       die(\"Inteactive git shell is not enabled.\\n\"\ns/Inteactive/Interactive/\n\n> +                           \"hint: \" COMMAND_DIR \" should exist \"\nI would recommend displaying ~/$COMMAND_DIR instead, or\n$HOME/COMMAND_DIR.  The latter could be considered an information leak\nthough.\n\n> +                           \"and have read and execute access.\");\n\nSounds fine to me otherwise.  Thanks for starting on this.\n"},{"id":"148703","messageId":"20100822080359.GB15561@kytes","threadId":"24811","inReplyTo":"AANLkTi=u7VUhz4VrU2hdd3SXK7rMvMrijL-X9qXCG1vs@mail.gmail.com","subject":"[PATCH v2] shell: Rewrite documentation and improve error message","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-22T08:04:02Z","receivedAt":"2010-08-22T08:04:02Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi Greg,\n\nThanks for the review. Here's the inter-diff.\n\ndiff --git a/Documentation/git-shell.txt b/Documentation/git-shell.txt\nindex c9f1dc9..e7c226e 100644\n--- a/Documentation/git-shell.txt\n+++ b/Documentation/git-shell.txt\n@@ -18,14 +18,15 @@ A login shell for SSH accounts to provide restricted Git access. When\n <command> can be one of 'git receive-pack', 'git upload-pack', 'git\n upload-archive', 'cvs server', or a command in COMMAND_DIR. The shell\n is started in interactive mode when no arguments are given; in this\n-case, COMMAND_DIR must exist, and any of the executables in them can\n-be invoked.\n+case, COMMAND_DIR must exist, and any of the executables in it can be\n+invoked.\n \n 'cvs server' is a special command which executes git-cvsserver.\n \n-COMMAND_DIR is the path 'git-shell-commands' in the user's home\n-directory. The user must have read and execute permissions to the\n-directory for it to be useful.\n+COMMAND_DIR is the path \"$HOME/git-shell-commands\". The user must have\n+read and execute permissions to the directory in order to execute the\n+programs in it. The programs are executed with a cwd of $HOME, and\n+<argument> is passed to them as a command-line argument.\n \n Author\n ------\n\ndiff --git a/shell.c b/shell.c\nindex 3fb804e..0903ac8 100644\n--- a/shell.c\n+++ b/shell.c\n@@ -153,8 +153,8 @@ int main(int argc, char **argv)\n \t\t/* Allow the user to run an interactive shell */\n \t\tcd_to_homedir();\n \t\tif (access(COMMAND_DIR, R_OK | X_OK) == -1) {\n-\t\t\tdie(\"Inteactive git shell is not enabled.\\n\"\n-\t\t\t    \"hint: \" COMMAND_DIR \" should exist \"\n+\t\t\tdie(\"Interactive git shell is not enabled.\\n\"\n+\t\t\t    \"hint: ~/$COMMAND_DIR should exist \"\n \t\t\t    \"and have read and execute access.\");\n \t\t}\n \t\trun_shell();\n\n-- >8 --\nFrom 01ff9085867ae6be558927cb4d905c441ffedb41 Mon Sep 17 00:00:00 2001\nFrom: Ramkumar Ramachandra <artagnon@gmail.com>\nDate: Fri, 20 Aug 2010 14:30:06 +0530\nSubject: [PATCH v2] shell: Rewrite documentation and improve error message\n\nUpdate the documentation of 'git shell' to mention the interactive\nmode and COMMAND_DIR. Also provide a hint when interactive mode is not\navailable in the shell.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\nCc: Greg Brockman <gdb@MIT.EDU>\n---\n Documentation/git-shell.txt |   28 +++++++++++++++++-----------\n shell.c                     |    7 +++++--\n 2 files changed, 22 insertions(+), 13 deletions(-)\n\ndiff --git a/Documentation/git-shell.txt b/Documentation/git-shell.txt\nindex 0f3ad81..1e38c70 100644\n--- a/Documentation/git-shell.txt\n+++ b/Documentation/git-shell.txt\n@@ -3,24 +3,30 @@ git-shell(1)\n \n NAME\n ----\n-git-shell - Restricted login shell for GIT-only SSH access\n+git-shell - Restricted login shell for Git-only SSH access\n \n \n SYNOPSIS\n --------\n-'$(git --exec-path)/git-shell' -c <command> <argument>\n+'git shell' [-c <command> <argument>]\n \n DESCRIPTION\n -----------\n-This is meant to be used as a login shell for SSH accounts you want\n-to restrict to GIT pull/push access only. It permits execution only\n-of server-side GIT commands implementing the pull/push functionality.\n-The commands can be executed only by the '-c' option; the shell is not\n-interactive.\n-\n-Currently, only four commands are permitted to be called, 'git-receive-pack'\n-'git-upload-pack' and 'git-upload-archive' with a single required argument, or\n-'cvs server' (to invoke 'git-cvsserver').\n+\n+A login shell for SSH accounts to provide restricted Git access. When\n+'-c' is given, the program executes <command> non-interactively;\n+<command> can be one of 'git receive-pack', 'git upload-pack', 'git\n+upload-archive', 'cvs server', or a command in COMMAND_DIR. The shell\n+is started in interactive mode when no arguments are given; in this\n+case, COMMAND_DIR must exist, and any of the executables in it can be\n+invoked.\n+\n+'cvs server' is a special command which executes git-cvsserver.\n+\n+COMMAND_DIR is the path \"$HOME/git-shell-commands\". The user must have\n+read and execute permissions to the directory in order to execute the\n+programs in it. The programs are executed with a cwd of $HOME, and\n+<argument> is passed to them as a command-line argument.\n \n Author\n ------\ndiff --git a/shell.c b/shell.c\nindex ffed615..0903ac8 100644\n--- a/shell.c\n+++ b/shell.c\n@@ -152,8 +152,11 @@ int main(int argc, char **argv)\n \t} else if (argc == 1) {\n \t\t/* Allow the user to run an interactive shell */\n \t\tcd_to_homedir();\n-\t\tif (access(COMMAND_DIR, R_OK | X_OK) == -1)\n-\t\t\tdie(\"Sorry, the interactive git-shell is not enabled\");\n+\t\tif (access(COMMAND_DIR, R_OK | X_OK) == -1) {\n+\t\t\tdie(\"Interactive git shell is not enabled.\\n\"\n+\t\t\t    \"hint: ~/$COMMAND_DIR should exist \"\n+\t\t\t    \"and have read and execute access.\");\n+\t\t}\n \t\trun_shell();\n \t\texit(0);\n \t} else if (argc != 3 || strcmp(argv[1], \"-c\")) {\n-- \n1.7.2.2.409.gdbb11.dirty\n"},{"id":"148766","messageId":"AANLkTintw7=25nsr-7NjE_-xJqMab_HggjPOtSHBf109@mail.gmail.com","threadId":"24811","inReplyTo":"20100822080359.GB15561@kytes","subject":"Re: [PATCH v2] shell: Rewrite documentation and improve error message","fromName":"Greg Brockman","fromEmail":"gdb@mit.edu","sentAt":"2010-08-23T17:42:12Z","receivedAt":"2010-08-23T17:42:12Z","isPatch":true,"sender":{"key":"gdb@mit.edu","avatar":"https://gravatar.com/avatar/3b907cf60d0cadf6d0659d5429d971b16965fb6b1e3f5acd26a6ba2974b45da4?d=mp&s=160"},"body":"> -COMMAND_DIR is the path 'git-shell-commands' in the user's home\n> -directory. The user must have read and execute permissions to the\n> -directory for it to be useful.\n> +COMMAND_DIR is the path \"$HOME/git-shell-commands\". The user must have\n> +read and execute permissions to the directory in order to execute the\n> +programs in it. The programs are executed with a cwd of $HOME, and\n> +<argument> is passed to them as a command-line argument.\nSorry, I guess I wasn't clear enough with what I meant here.  The\n<argument> is actually parsed as a command-line string (so split on\nspaces respecting quotes), not just passed as a raw command-line\nargument.\n\n>                if (access(COMMAND_DIR, R_OK | X_OK) == -1) {\n> -                       die(\"Inteactive git shell is not enabled.\\n\"\n> -                           \"hint: \" COMMAND_DIR \" should exist \"\n> +                       die(\"Interactive git shell is not enabled.\\n\"\n> +                           \"hint: ~/$COMMAND_DIR should exist \"\n>                            \"and have read and execute access.\");\n>                }\n>                run_shell();\nWhoops, I'm not sure why I put a $ here.  \"hint: ~/\" COMMAND_DIR \"\nshould exist \" is definitely what you want.\n\nOther than that, looks fine to me.\n"},{"id":"148819","messageId":"20100824053647.GA2037@kytes","threadId":"24811","inReplyTo":"AANLkTintw7=25nsr-7NjE_-xJqMab_HggjPOtSHBf109@mail.gmail.com","subject":"[PATCH v3] shell: Rewrite documentation and improve error message","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-24T05:36:51Z","receivedAt":"2010-08-24T05:36:51Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Update the documentation of 'git shell' to mention the interactive\nmode and COMMAND_DIR. Also provide a hint when interactive mode is not\navailable in the shell.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\nCc: Greg Brockman <gdb@MIT.EDU>\n---\n Interdiff:\n diff --git a/Documentation/git-shell.txt b/Documentation/git-shell.txt\n index 1e38c70..6403126 100644\n --- a/Documentation/git-shell.txt\n +++ b/Documentation/git-shell.txt\n @@ -26,7 +26,7 @@ invoked.\n  COMMAND_DIR is the path \"$HOME/git-shell-commands\". The user must have\n  read and execute permissions to the directory in order to execute the\n  programs in it. The programs are executed with a cwd of $HOME, and\n -<argument> is passed to them as a command-line argument.\n +<argument> is parsed as a command-line string.\n  \n  Author\n  ------\n \tModified shell.c\n diff --git a/shell.c b/shell.c\n index 0903ac8..6aade3d 100644\n --- a/shell.c\n +++ b/shell.c\n @@ -154,7 +154,7 @@ int main(int argc, char **argv)\n  \t\tcd_to_homedir();\n  \t\tif (access(COMMAND_DIR, R_OK | X_OK) == -1) {\n  \t\t\tdie(\"Interactive git shell is not enabled.\\n\"\n -\t\t\t    \"hint: ~/$COMMAND_DIR should exist \"\n +\t\t\t    \"hint: ~/\" $COMMAND_DIR \" should exist \"\n  \t\t\t    \"and have read and execute access.\");\n  \t\t}\n  \t\trun_shell();\n\n Documentation/git-shell.txt |   28 +++++++++++++++++-----------\n shell.c                     |    7 +++++--\n 2 files changed, 22 insertions(+), 13 deletions(-)\n\ndiff --git a/Documentation/git-shell.txt b/Documentation/git-shell.txt\nindex 0f3ad81..6403126 100644\n--- a/Documentation/git-shell.txt\n+++ b/Documentation/git-shell.txt\n@@ -3,24 +3,30 @@ git-shell(1)\n \n NAME\n ----\n-git-shell - Restricted login shell for GIT-only SSH access\n+git-shell - Restricted login shell for Git-only SSH access\n \n \n SYNOPSIS\n --------\n-'$(git --exec-path)/git-shell' -c <command> <argument>\n+'git shell' [-c <command> <argument>]\n \n DESCRIPTION\n -----------\n-This is meant to be used as a login shell for SSH accounts you want\n-to restrict to GIT pull/push access only. It permits execution only\n-of server-side GIT commands implementing the pull/push functionality.\n-The commands can be executed only by the '-c' option; the shell is not\n-interactive.\n-\n-Currently, only four commands are permitted to be called, 'git-receive-pack'\n-'git-upload-pack' and 'git-upload-archive' with a single required argument, or\n-'cvs server' (to invoke 'git-cvsserver').\n+\n+A login shell for SSH accounts to provide restricted Git access. When\n+'-c' is given, the program executes <command> non-interactively;\n+<command> can be one of 'git receive-pack', 'git upload-pack', 'git\n+upload-archive', 'cvs server', or a command in COMMAND_DIR. The shell\n+is started in interactive mode when no arguments are given; in this\n+case, COMMAND_DIR must exist, and any of the executables in it can be\n+invoked.\n+\n+'cvs server' is a special command which executes git-cvsserver.\n+\n+COMMAND_DIR is the path \"$HOME/git-shell-commands\". The user must have\n+read and execute permissions to the directory in order to execute the\n+programs in it. The programs are executed with a cwd of $HOME, and\n+<argument> is parsed as a command-line string.\n \n Author\n ------\ndiff --git a/shell.c b/shell.c\nindex ffed615..6aade3d 100644\n--- a/shell.c\n+++ b/shell.c\n@@ -152,8 +152,11 @@ int main(int argc, char **argv)\n \t} else if (argc == 1) {\n \t\t/* Allow the user to run an interactive shell */\n \t\tcd_to_homedir();\n-\t\tif (access(COMMAND_DIR, R_OK | X_OK) == -1)\n-\t\t\tdie(\"Sorry, the interactive git-shell is not enabled\");\n+\t\tif (access(COMMAND_DIR, R_OK | X_OK) == -1) {\n+\t\t\tdie(\"Interactive git shell is not enabled.\\n\"\n+\t\t\t    \"hint: ~/\" $COMMAND_DIR \" should exist \"\n+\t\t\t    \"and have read and execute access.\");\n+\t\t}\n \t\trun_shell();\n \t\texit(0);\n \t} else if (argc != 3 || strcmp(argv[1], \"-c\")) {\n-- \n1.7.2.2.409.gdbb11.dirty\n"},{"id":"148820","messageId":"AANLkTikeZTF5zZyRDtLfnPrtCYFH0WayXrJeCj8_VuC1@mail.gmail.com","threadId":"24811","inReplyTo":"20100824053647.GA2037@kytes","subject":"Re: [PATCH v3] shell: Rewrite documentation and improve error message","fromName":"Greg Brockman","fromEmail":"gdb@mit.edu","sentAt":"2010-08-24T05:43:31Z","receivedAt":"2010-08-24T05:43:31Z","isPatch":true,"sender":{"key":"gdb@mit.edu","avatar":"https://gravatar.com/avatar/3b907cf60d0cadf6d0659d5429d971b16965fb6b1e3f5acd26a6ba2974b45da4?d=mp&s=160"},"body":">  -                          \"hint: ~/$COMMAND_DIR should exist \"\n>  +                          \"hint: ~/\" $COMMAND_DIR \" should exist \"\nThere's still a floating $.  (Recall, you're in C land here, not shell.)\n"},{"id":"148835","messageId":"20100824123525.GA18641@kytes","threadId":"24811","inReplyTo":"AANLkTikeZTF5zZyRDtLfnPrtCYFH0WayXrJeCj8_VuC1@mail.gmail.com","subject":"Re: [PATCH v3] shell: Rewrite documentation and improve error message","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-24T12:35:27Z","receivedAt":"2010-08-24T12:35:27Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi Greg,\n\nGreg Brockman writes:\n> >  -                          \"hint: ~/$COMMAND_DIR should exist \"\n> >  +                          \"hint: ~/\" $COMMAND_DIR \" should exist \"\n> There's still a floating $.  (Recall, you're in C land here, not shell.)\n\nUgh. So sorry about this- I've been suffering from insomnia over the\nlast few days.\n\n-- 8< --\ndiff --git a/shell.c b/shell.c\nindex 6aade3d..b539cdf 100644\n--- a/shell.c\n+++ b/shell.c\n@@ -154,7 +154,7 @@ int main(int argc, char **argv)\n \t\tcd_to_homedir();\n \t\tif (access(COMMAND_DIR, R_OK | X_OK) == -1) {\n \t\t\tdie(\"Interactive git shell is not enabled.\\n\"\n-\t\t\t    \"hint: ~/\" $COMMAND_DIR \" should exist \"\n+\t\t\t    \"hint: ~/\" COMMAND_DIR \" should exist \"\n \t\t\t    \"and have read and execute access.\");\n \t\t}\n \t\trun_shell();\n"},{"id":"148842","messageId":"AANLkTikqoELMOxjdtzvrFTgyHK0dLCZLrwt2NhCSUDL5@mail.gmail.com","threadId":"24811","inReplyTo":"20100824123525.GA18641@kytes","subject":"Re: [PATCH v3] shell: Rewrite documentation and improve error message","fromName":"Greg Brockman","fromEmail":"gdb@mit.edu","sentAt":"2010-08-24T15:22:07Z","receivedAt":"2010-08-24T15:22:07Z","isPatch":true,"sender":{"key":"gdb@mit.edu","avatar":"https://gravatar.com/avatar/3b907cf60d0cadf6d0659d5429d971b16965fb6b1e3f5acd26a6ba2974b45da4?d=mp&s=160"},"body":">> >  -                          \"hint: ~/$COMMAND_DIR should exist \"\n>> >  +                          \"hint: ~/\" $COMMAND_DIR \" should exist \"\n>> There's still a floating $.  (Recall, you're in C land here, not shell.)\n>\n> Ugh. So sorry about this- I've been suffering from insomnia over the\n> last few days.\nNo worries :).\n\n> -- 8< --\n> diff --git a/shell.c b/shell.c\n> index 6aade3d..b539cdf 100644\n> --- a/shell.c\n> +++ b/shell.c\n> @@ -154,7 +154,7 @@ int main(int argc, char **argv)\n>                cd_to_homedir();\n>                if (access(COMMAND_DIR, R_OK | X_OK) == -1) {\n>                        die(\"Interactive git shell is not enabled.\\n\"\n> -                           \"hint: ~/\" $COMMAND_DIR \" should exist \"\n> +                           \"hint: ~/\" COMMAND_DIR \" should exist \"\n>                            \"and have read and execute access.\");\n>                }\n>                run_shell();\nLGTM.\n\nReviewed-by: Greg Brockman <gdb@mit.edu>\n"},{"id":"148859","messageId":"7vaaobvnr8.fsf@alter.siamese.dyndns.org","threadId":"24811","inReplyTo":"AANLkTikqoELMOxjdtzvrFTgyHK0dLCZLrwt2NhCSUDL5@mail.gmail.com","subject":"Re: [PATCH v3] shell: Rewrite documentation and improve error message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-08-24T19:01:15Z","receivedAt":"2010-08-24T19:01:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Greg Brockman <gdb@MIT.EDU> writes:\n\n>> Ugh. So sorry about this- I've been suffering from insomnia over the\n>> last few days.\n> No worries :).\n> ...\n>> -- 8< --\n> LGTM.\n>\n> Reviewed-by: Greg Brockman <gdb@mit.edu>\n\nThanks, both.  Will queue.\n"}]}