diff options
Diffstat (limited to 'src/attr.c')
| -rw-r--r-- | src/attr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/attr.c b/src/attr.c index 56d04d3a9..b7ac6355d 100644 --- a/src/attr.c +++ b/src/attr.c @@ -334,8 +334,6 @@ int git_attr_cache__push_file( } /* if not in cache, load data, parse, and cache */ - if (git_attr_file__new(&file, source, relfile, &cache->pool) < 0) - return -1; if (source == GIT_ATTR_FILE_FROM_FILE) error = load_attr_file(filename, &content); @@ -354,6 +352,9 @@ int git_attr_cache__push_file( if (blob) content = git_blob_rawcontent(blob); + if ((error = git_attr_file__new(&file, source, relfile, &cache->pool)) < 0) + goto finish; + if (parse && (error = parse(repo, content, file)) < 0) goto finish; |
