git-branch: Documentation fixes
[git.git] / git.c
diff --git a/git.c b/git.c
index 0fd95bf..5e7da74 100644 (file)
--- a/git.c
+++ b/git.c
@@ -244,6 +244,11 @@ int main(int argc, char **argv, char **envp)
        for (i = 1; i < argc; i++) {
                char *arg = argv[i];
 
+               if (!strcmp(arg, "help")) {
+                       show_help = 1;
+                       continue;
+               }
+
                if (strncmp(arg, "--", 2))
                        break;
 
@@ -278,7 +283,7 @@ int main(int argc, char **argv, char **envp)
        if (*exec_path != '/') {
                if (!getcwd(git_command, sizeof(git_command))) {
                        fprintf(stderr,
-                               "git: cannot determine current directory");
+                               "git: cannot determine current directory\n");
                        exit(1);
                }
                len = strlen(git_command);