summaryrefslogtreecommitdiff
path: root/shell.c
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2010-08-24 05:36:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-24 17:47:21 (GMT)
commit70256a3a6780a9fd181edf0bf0e762eb56637c9c (patch)
tree44b9f8cafdf54b4574cb02c936fcc0a4c22e2703 /shell.c
parent54baefda8c0bbee461a4cd68dca970d92fddced0 (diff)
downloadgit-70256a3a6780a9fd181edf0bf0e762eb56637c9c.zip
git-70256a3a6780a9fd181edf0bf0e762eb56637c9c.tar.gz
git-70256a3a6780a9fd181edf0bf0e762eb56637c9c.tar.bz2
shell: Rewrite documentation and improve error message
Update the documentation of 'git shell' to mention the interactive mode and COMMAND_DIR. Also provide a hint when interactive mode is not available in the shell. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Reviewed-by: Greg Brockman <gdb@MIT.EDU> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'shell.c')
-rw-r--r--shell.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/shell.c b/shell.c
index e07aef4..f0f6c2d 100644
--- a/shell.c
+++ b/shell.c
@@ -149,8 +149,11 @@ int main(int argc, char **argv)
} else if (argc == 1) {
/* Allow the user to run an interactive shell */
cd_to_homedir();
- if (access(COMMAND_DIR, R_OK | X_OK) == -1)
- die("Sorry, the interactive git-shell is not enabled");
+ if (access(COMMAND_DIR, R_OK | X_OK) == -1) {
+ die("Interactive git shell is not enabled.\n"
+ "hint: ~/" COMMAND_DIR " should exist "
+ "and have read and execute access.");
+ }
run_shell();
exit(0);
} else if (argc != 3 || strcmp(argv[1], "-c")) {