@@ -69,7 +69,7 @@ static int stateless_rpc;
6969static const char * pack_objects_hook ;
7070
7171static int filter_capability_requested ;
72- static int filter_advertise ;
72+ static int allow_filter ;
7373static struct list_objects_filter_options filter_options ;
7474
7575static void reset_timeout (void )
@@ -846,7 +846,7 @@ static void receive_needs(void)
846846no_progress = 1 ;
847847if (parse_feature_request (features , "include-tag" ))
848848use_include_tag = 1 ;
849- if (parse_feature_request (features , "filter" ))
849+ if (allow_filter && parse_feature_request (features , "filter" ))
850850filter_capability_requested = 1 ;
851851
852852o = parse_object (& oid_buf );
@@ -976,7 +976,7 @@ static int send_ref(const char *refname, const struct object_id *oid,
976976 " allow-reachable-sha1-in-want" : "" ,
977977 stateless_rpc ? " no-done" : "" ,
978978 symref_info .buf ,
979- filter_advertise ? " filter" : "" ,
979+ allow_filter ? " filter" : "" ,
980980 git_user_agent_sanitized ());
981981strbuf_release (& symref_info );
982982} else {
@@ -1056,7 +1056,7 @@ static int upload_pack_config(const char *var, const char *value, void *unused)
10561056if (!strcmp ("uploadpack.packobjectshook" , var ))
10571057return git_config_string (& pack_objects_hook , var , value );
10581058} else if (!strcmp ("uploadpack.allowfilter" , var )) {
1059- filter_advertise = git_config_bool (var , value );
1059+ allow_filter = git_config_bool (var , value );
10601060}
10611061return parse_hide_refs_config (var , value , "uploadpack" );
10621062}
0 commit comments