@@ -84,7 +84,7 @@ static int prune_tags = -1; /* unspecified */
84
84
85
85
static int append , dry_run , force , keep , update_head_ok ;
86
86
static int write_fetch_head = 1 ;
87
- static int verbosity , deepen_relative , set_upstream , refetch ;
87
+ static int verbosity , deepen_relative , set_upstream , refetch , must_filter ;
88
88
static int progress = -1 ;
89
89
static int tags = TAGS_DEFAULT , update_shallow , deepen ;
90
90
static int atomic_fetch ;
@@ -1508,6 +1508,9 @@ static struct transport *prepare_transport(struct remote *remote, int deepen)
1508
1508
transport = transport_get (remote , NULL );
1509
1509
transport_set_verbosity (transport , verbosity , progress );
1510
1510
transport -> family = family ;
1511
+ if (transport -> smart_options ) {
1512
+ transport -> smart_options -> must_filter = must_filter ;
1513
+ }
1511
1514
if (upload_pack )
1512
1515
set_option (transport , TRANS_OPT_UPLOADPACK , upload_pack );
1513
1516
if (keep )
@@ -2322,6 +2325,8 @@ int cmd_fetch(int argc,
2322
2325
N_ ("append to .git/FETCH_HEAD instead of overwriting" )),
2323
2326
OPT_BOOL (0 , "atomic" , & atomic_fetch ,
2324
2327
N_ ("use atomic transaction to update references" )),
2328
+ OPT_BOOL (0 , "must-filter" , & must_filter ,
2329
+ N_ ("error on filter not supported by server" )),
2325
2330
OPT_STRING (0 , "upload-pack" , & upload_pack , N_ ("path" ),
2326
2331
N_ ("path to upload pack on remote end" )),
2327
2332
OPT__FORCE (& force , N_ ("force overwrite of local reference" ), 0 ),
0 commit comments