@@ -69,7 +69,7 @@ static int stateless_rpc;
69
69
static const char * pack_objects_hook ;
70
70
71
71
static int filter_capability_requested ;
72
- static int filter_advertise ;
72
+ static int allow_filter ;
73
73
static struct list_objects_filter_options filter_options ;
74
74
75
75
static void reset_timeout (void )
@@ -846,7 +846,7 @@ static void receive_needs(void)
846
846
no_progress = 1 ;
847
847
if (parse_feature_request (features , "include-tag" ))
848
848
use_include_tag = 1 ;
849
- if (parse_feature_request (features , "filter" ))
849
+ if (allow_filter && parse_feature_request (features , "filter" ))
850
850
filter_capability_requested = 1 ;
851
851
852
852
o = parse_object (& oid_buf );
@@ -976,7 +976,7 @@ static int send_ref(const char *refname, const struct object_id *oid,
976
976
" allow-reachable-sha1-in-want" : "" ,
977
977
stateless_rpc ? " no-done" : "" ,
978
978
symref_info .buf ,
979
- filter_advertise ? " filter" : "" ,
979
+ allow_filter ? " filter" : "" ,
980
980
git_user_agent_sanitized ());
981
981
strbuf_release (& symref_info );
982
982
} else {
@@ -1056,7 +1056,7 @@ static int upload_pack_config(const char *var, const char *value, void *unused)
1056
1056
if (!strcmp ("uploadpack.packobjectshook" , var ))
1057
1057
return git_config_string (& pack_objects_hook , var , value );
1058
1058
} else if (!strcmp ("uploadpack.allowfilter" , var )) {
1059
- filter_advertise = git_config_bool (var , value );
1059
+ allow_filter = git_config_bool (var , value );
1060
1060
}
1061
1061
return parse_hide_refs_config (var , value , "uploadpack" );
1062
1062
}
0 commit comments