Re: [PATCH v2] shell: Rewrite documentation and improve error message
- From
Greg Brockman <gdb@mit.edu>
- Date
- Aug 23, 2010, 17:42 UTC
- Message-ID
- <AANLkTintw7=25nsr-7NjE_-xJqMab_HggjPOtSHBf109@mail.gmail.com>
- In-Reply-To
- <20100822080359.GB15561@kytes>
Show 7 quoted lines
> -COMMAND_DIR is the path 'git-shell-commands' in the user's home > -directory. The user must have read and execute permissions to the > -directory for it to be useful. > +COMMAND_DIR is the path "$HOME/git-shell-commands". The user must have > +read and execute permissions to the directory in order to execute the > +programs in it. The programs are executed with a cwd of $HOME, and > +<argument> is passed to them as a command-line argument.
Sorry, I guess I wasn't clear enough with what I meant here. The <argument> is actually parsed as a command-line string (so split on spaces respecting quotes), not just passed as a raw command-line argument.
Show 8 quoted lines
> if (access(COMMAND_DIR, R_OK | X_OK) == -1) {
> - die("Inteactive git shell is not enabled.\n"
> - "hint: " COMMAND_DIR " should exist "
> + die("Interactive git shell is not enabled.\n"
> + "hint: ~/$COMMAND_DIR should exist "
> "and have read and execute access.");
> }
> run_shell();Whoops, I'm not sure why I put a $ here. "hint: ~/" COMMAND_DIR " should exist " is definitely what you want.
Other than that, looks fine to me.