Set 'required' option on Git filter to true

This signals to Git that the filter must complete successfully for the
content to be usable.
This commit is contained in:
Andrew Ayer
2014-08-02 21:33:37 -07:00
parent da25322dbc
commit 07231c1630

View File

@@ -72,11 +72,13 @@ static void configure_git_filters (const char* key_name)
escaped_git_crypt_path + " smudge --key-name=" + key_name);
git_config(std::string("filter.git-crypt-") + key_name + ".clean",
escaped_git_crypt_path + " clean --key-name=" + key_name);
git_config(std::string("filter.git-crypt-") + key_name + ".required", "true");
git_config(std::string("diff.git-crypt-") + key_name + ".textconv",
escaped_git_crypt_path + " diff --key-name=" + key_name);
} else {
git_config("filter.git-crypt.smudge", escaped_git_crypt_path + " smudge");
git_config("filter.git-crypt.clean", escaped_git_crypt_path + " clean");
git_config("filter.git-crypt.required", "true");
git_config("diff.git-crypt.textconv", escaped_git_crypt_path + " diff");
}
}