Re: [RFC/PATCH] remote: add new sync command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 08, 2011 at 07:31:09PM +0200, Felipe Contreras wrote:

> >  2. update remote refs with local values, including pushing anything
> >     new that we don't have locally (--sync-new)
> 
> Anything new that we don't have *remotely*.

Sorry, yeah.

> >  1. git push --prune <remote> :
> >
> >     I.e., use the "matching" refspec to not push new things, but turn
> >     on pruning.
> 
> I guess so, but ":" seems a bit obscure.

Yeah, it is. It's also the default, so you could just do:

  git push --prune <remote>

Although some people have argued for changing the default in future
versions. I don't know what the status of that is.

> >  2. git push <remote> refs/heads/*
> >
> >     Turn off pruning, but use an explicit refspec, not just "matching",
> >     which will push all local branches.
> 
> Isn't refs/heads/* the same as --all? BTW. I think --all is confusing,
> should be --branches, or something.

Doesn't --all mean all refs, including tags and branches? I thought that
was the thing you were avoiding. We could add syntactic sugar to make
--branches mean "refs/heads/*". But I do worry that pseudo-options like
that just end up creating more confusion (I seem to recall there being a
lot of confusion about "--tags", which is more or less the same thing).

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]