Thread (7 messages) flat view 7 messages, 4 authors, 2020-09-24

Re: [RFC v2 1/1] refspec: add support for negative refspecs

From: Jacob Keller <hidden>
Date: 2020-09-24 23:43:07

On Thu, Sep 17, 2020 at 5:02 PM Junio C Hamano [off-list ref] wrote:
Jacob Keller [off-list ref] writes:
quoted
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help