git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 5 of 10 in “shell: Rewrite documentation and improve error message”
  1. shell: Rewrite documentation and improve error messageRamkumar Ramachandra, Aug 20, 2010
  2. Ramkumar RamachandraAug 20, 2010
  3. Greg BrockmanAug 22, 2010
  4. shell: Rewrite documentation and improve error messageRamkumar Ramachandra, Aug 22, 2010
  5. Greg BrockmanAug 23, 2010
  6. shell: Rewrite documentation and improve error messageRamkumar Ramachandra, Aug 24, 2010
  7. Greg BrockmanAug 24, 2010
  8. Ramkumar RamachandraAug 24, 2010
  9. Greg BrockmanAug 24, 2010
  10. Junio C HamanoAug 24, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.