Code

Merge branch 'jb/required-filter'
authorJunio C Hamano <gitster@pobox.com>
Tue, 28 Feb 2012 21:25:57 +0000 (13:25 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Feb 2012 21:25:57 +0000 (13:25 -0800)
* jb/required-filter:
  Add a setting to require a filter to be successful

Conflicts:
convert.c

1  2 
convert.c

diff --cc convert.c
index 4534e2c2b003998a590637fc43c0549ff23f71b2,c06309f5e102c36f5751fce8cb83229ff9acca42..66021550c32f86e662fe5da84c852e80ae790450
+++ b/convert.c
@@@ -776,11 -757,16 +783,16 @@@ int convert_to_git(const char *path, co
        struct conv_attrs ca;
  
        convert_attrs(&ca, path);
-       if (ca.drv)
+       if (ca.drv) {
                filter = ca.drv->clean;
+               required = ca.drv->required;
+       }
  
        ret |= apply_filter(path, src, len, dst, filter);
 -      if (ret) {
+       if (!ret && required)
+               die("%s: clean filter '%s' failed", path, ca.drv->name);
 +      if (ret && dst) {
                src = dst->buf;
                len = dst->len;
        }