git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jacob Keller <jacob.keller@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>,
	Git mailing list <git@vger.kernel.org>, Jeff King <peff@peff.net>
Subject: Re: [RFC v2 1/1] refspec: add support for negative refspecs
Date: Thu, 24 Sep 2020 16:42:54 -0700	[thread overview]
Message-ID: <CA+P7+xqJis+DA=ZZ0Qphf0P8RGVbXyvHUHaqo30LQDytxAvs-w@mail.gmail.com> (raw)
In-Reply-To: <xmqqzh5onea1.fsf@gitster.c.googlers.com>

On Thu, Sep 17, 2020 at 5:02 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Jacob Keller <jacob.e.keller@intel.com> 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

      parent reply	other threads:[~2020-09-24 23:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21 21:52 [RFC v2 0/1] implement support for negative refspecs Jacob Keller
2020-08-21 21:52 ` [RFC v2 1/1] refspec: add " Jacob Keller
2020-08-22 13:29   ` Johannes Schindelin
2020-08-24 15:47     ` Jacob Keller
2020-08-24 17:55     ` Junio C Hamano
2020-08-24 19:26       ` Jacob Keller
2020-09-17 20:21   ` Junio C Hamano
2020-09-18  0:01   ` Junio C Hamano
2020-09-24 23:33     ` Jacob Keller
2020-09-24 23:42     ` Jacob Keller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+P7+xqJis+DA=ZZ0Qphf0P8RGVbXyvHUHaqo30LQDytxAvs-w@mail.gmail.com' \
    --to=jacob.keller@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacob.e.keller@intel.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).