# Negation in refspecs

2 messages from 2014-03-05 to 2014-03-05. Participants: Mickey Killianey, Jeff King.
Thread: https://gitlist.dev/t/36067

## Mickey Killianey, 2014-03-05 18:06

Subject: Negation in refspecs
Message-ID: <CACAUoX6Y5eC_9PxihkecfgWeCetj4K30sVm7wHosTqqh=_0unA@mail.gmail.com>
URL: https://gitlist.dev/e/CACAUoX6Y5eC_9PxihkecfgWeCetj4K30sVm7wHosTqqh%3D_0unA%40mail.gmail.com

```
Is there any syntax to support partial negations of refspecs, such as:

+refs/heads/*:refs/remotes/origin/*
!refs/heads/dont-pull:
!:refs/remotes/origin/dont-push

If not now, is negation something that might be possible/reasonable in
a future version of Git, or is it difficult/unlikely to change?

Mick

```

## Jeff King, 2014-03-05 19:11

Subject: Re: Negation in refspecs
Message-ID: <20140305191128.GC31252@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20140305191128.GC31252%40sigill.intra.peff.net
In-Reply-To: <CACAUoX6Y5eC_9PxihkecfgWeCetj4K30sVm7wHosTqqh=_0unA@mail.gmail.com>

```
On Wed, Mar 05, 2014 at 10:06:26AM -0800, Mickey Killianey wrote:

> Is there any syntax to support partial negations of refspecs, such as:
> 
> +refs/heads/*:refs/remotes/origin/*
> !refs/heads/dont-pull:
> !:refs/remotes/origin/dont-push
> 
> If not now, is negation something that might be possible/reasonable in
> a future version of Git, or is it difficult/unlikely to change?

No, it doesn't exist now. It's something that people have asked for
occasionally, but I don't think anybody is actively working on it.

I posted a rough patch here:

  http://thread.gmane.org/gmane.comp.version-control.git/240997/focus=241057

about a month ago, but I do not have any immediate plans to take it
further (that email details some of the issues). If you're interested in
working on it, I think people are receptive to the idea; it just needs a
clean implementation.

-Peff

```
