diff options
author | Vicent Martà <tanoku@gmail.com> | 2012-03-02 23:08:00 +0400 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2012-03-02 23:08:00 +0400 |
commit | f2c25d1893cfa897b0d36005604c134a731e402d (patch) | |
tree | 1ed8dade77acaea87066a959c3352a17e9147016 /src/crlf.c | |
parent | c63793ee81ee6961b2430e88379d491fa8e91bfb (diff) |
config: Implement a proper cvar cache
Diffstat (limited to 'src/crlf.c')
-rw-r--r-- | src/crlf.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/crlf.c b/src/crlf.c index e74f8e89b..404156d6a 100644 --- a/src/crlf.c +++ b/src/crlf.c @@ -223,8 +223,16 @@ int git_filter_add__crlf_to_odb(git_vector *filters, git_repository *repo, const if (ca.crlf_action == GIT_CRLF_BINARY) return 0; - if (ca.crlf_action == GIT_CRLF_GUESS && repo->filter_options.auto_crlf == GIT_AUTO_CRLF_FALSE) - return 0; + if (ca.crlf_action == GIT_CRLF_GUESS) { + int auto_crlf; + + if ((error = git_repository__cvar( + &auto_crlf, repo, GIT_CVAR_AUTO_CRLF)) < GIT_SUCCESS) + return error; + + if (auto_crlf == GIT_AUTO_CRLF_FALSE) + return 0; + } /* If we're good, we create a new filter object and push it * into the filters array */ |