user-manual: minor editing for conciseness
[gitweb.git] / setup.c
diff --git a/setup.c b/setup.c
index dda67d268dcacce2293d245395a38106860fb881..2b8e8c0e5e1e957615e986efaab289d77c8fc51c 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -103,7 +103,7 @@ void verify_non_filename(const char *prefix, const char *arg)
        if (!lstat(name, &st))
                die("ambiguous argument '%s': both revision and filename\n"
                    "Use '--' to separate filenames from revisions", arg);
-       if (errno != ENOENT)
+       if (errno != ENOENT && errno != ENOTDIR)
                die("'%s': %s", arg, strerror(errno));
 }
 
@@ -216,7 +216,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
                die("Not a git repository: '%s'", gitdirenv);
        }
 
-       if (!getcwd(cwd, sizeof(cwd)) || cwd[0] != '/')
+       if (!getcwd(cwd, sizeof(cwd)-1) || cwd[0] != '/')
                die("Unable to read current working directory");
 
        offset = len = strlen(cwd);