]> git.ipfire.org Git - thirdparty/git.git/blobdiff - diff.c
Use symbolic name SHORT_NAME_AMBIGUOUS as error return value
[thirdparty/git.git] / diff.c
diff --git a/diff.c b/diff.c
index bfc864d9ccd94215aae9cc899c83e9ad149c590c..17d68fa699f7c88aef8e6c1a0812575bfaec70e1 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -650,7 +650,7 @@ static void diff_fill_sha1_info(struct diff_filespec *one)
        if (DIFF_FILE_VALID(one)) {
                if (!one->sha1_valid) {
                        struct stat st;
-                       if (stat(one->path, &st) < 0)
+                       if (lstat(one->path, &st) < 0)
                                die("stat %s", one->path);
                        if (index_path(one->sha1, one->path, &st, 0))
                                die("cannot hash %s\n", one->path);
@@ -787,7 +787,7 @@ int diff_setup_done(struct diff_options *options)
                         * so it is safe for us to do this here.  Also
                         * it does not smudge active_cache or active_nr
                         * when it fails, so we do not have to worry about
-                        * cleaning it up oufselves either.
+                        * cleaning it up ourselves either.
                         */
                        read_cache();
        }