On Thu, Sep 17, 2020 at 5:02 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > > Jacob Keller <jacob.e.keller@xxxxxxxxx> writes: > > > @@ -1441,6 +1559,8 @@ int match_push_refs(struct ref *src, struct ref **dst, > > string_list_clear(&src_ref_index, 0); > > } > > > > + *dst = apply_negative_refspecs(*dst, rs); > > + > > if (errs) > > return -1; > > return 0; > > And after grabbing all the candidate refs to be updated via this > push, we filter out the ones that match negative pattern. Can it > also produce an error, or it can never fail (to udpate errs)? > It can't fail. Either refs match a negative refspec and will get excluded, or they do not match a negative refspec and will be kept. We already validate the negative refspecs earlier. Thanks, Jake