transport: allow summary-width to be computed dynamically
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index b4310f814c1237ef457510c33f64738a07652e44..cefc13eb8e811a5a5021fcd9573d5fd3c9a37bae 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -2703,7 +2703,7 @@ static int reuse_worktree_file(const char *name, const unsigned char *sha1, int
         * This is not the sha1 we are looking for, or
         * unreusable because it is not a regular file.
         */
-       if (hashcmp(sha1, ce->sha1) || !S_ISREG(ce->ce_mode))
+       if (hashcmp(sha1, ce->oid.hash) || !S_ISREG(ce->ce_mode))
                return 0;
 
        /*
@@ -3399,7 +3399,7 @@ void diff_setup_done(struct diff_options *options)
                         */
                        read_cache();
        }
-       if (options->abbrev <= 0 || 40 < options->abbrev)
+       if (40 < options->abbrev)
                options->abbrev = 40; /* full */
 
        /*