When we have a filespec primed with size, later size_only request should be fillable without recomputing it. --- diff --git a/diff.c b/diff.c index 0f8c68f..fb3eba5 100644 --- a/diff.c +++ b/diff.c @@ -1515,6 +1515,9 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only) if (s->data) return err; + if (size_only && 0 < s->size) + return err; + if (S_ISDIRLNK(s->mode)) return diff_populate_gitlink(s, size_only); - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html