From 07231c16306e2f5f59f26b7f25f44a9affb72ce9 Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Sat, 2 Aug 2014 21:33:37 -0700 Subject: [PATCH] Set 'required' option on Git filter to true This signals to Git that the filter must complete successfully for the content to be usable. --- commands.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands.cpp b/commands.cpp index 0e5f7df..3f8d489 100644 --- a/commands.cpp +++ b/commands.cpp @@ -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"); } }