On Sat, Dec 19, 2020 at 10:05 AM Junio C Hamano <gitster@xxxxxxxxx> wrote: > > Original author of the feature (Jacob) cc'ed for insight. > Hi, Sorry I missed this thread last couple months. > - Can we have refspec->src==NULL in cases other than where > refspec->matching is true? If not, then perhaps the patch should > insert, before the problematic "else if" clause, something like > > if (match_name_with_pattern(...)) > string_list_append_nodup(...); > + } else if (refspec->matching) { > + ... behaviour for the matching case ... > + } else if (refspec->src == NULL) { > + BUG("refspec->src cannot be null here"); > } else { > if (!strcmp(needle, refspec->src)) > > - We'd need to decide if ignoring is the right behaviour for the > matching refspec. I do not recall what we decided the logic of > the function should be offhand. > Isn't this patch about how we somehow broke ":" on its own, not as a negative refspec?