diff options
author | Junio C Hamano <junkio@cox.net> | 2007-05-03 23:26:54 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-05-03 23:26:54 -0700 |
commit | 9aae177a4adff326421e55c7c0f3138de15ce2c1 (patch) | |
tree | ca19b08ff373ea122f87c90d03d111b03a89921e /diff.c | |
parent | 50acc58914bf02217e55fdd739a844f2bfc45410 (diff) | |
parent | e3ad95a8be82663d27cb501eaf9bad86a30f9cda (diff) | |
download | git-9aae177a4adff326421e55c7c0f3138de15ce2c1.tar.gz |
Merge branch 'maint'
* maint:
gitweb: use decode_utf8 directly
posix compatibility for t4200
Document 'opendiff' value in config.txt and git-mergetool.txt
Allow PERL_PATH="/usr/bin/env perl"
Make xstrndup common
diff.c: fix "size cache" handling.
http-fetch: Disable use of curl multi support for libcurl < 7.16.
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1572,14 +1572,15 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only) enum object_type type; struct sha1_size_cache *e; + if (size_only && use_size_cache && + (e = locate_size_cache(s->sha1, 1, 0)) != NULL) { + s->size = e->size; + return 0; + } + if (size_only) { - e = locate_size_cache(s->sha1, 1, 0); - if (e) { - s->size = e->size; - return 0; - } type = sha1_object_info(s->sha1, &s->size); - if (type < 0) + if (use_size_cache && 0 < type) locate_size_cache(s->sha1, 0, s->size); } else { |